Forum Discussion

Flo_Rod's avatar
Flo_Rod
Cloud Apps
03-12-2024
Solved

Using Rankdesc to create a custom Column

Hi,  I am a sisense newbie. I am trying to create a custom column in the data model to rank latest week and other weeks from latest to oldest. I am using a live model connected to a snowflake databa...
  • DRay's avatar
    DRay
    03-12-2024

    Hi Flo_Rod,

    Thank you. Queries against a Live Data Source use the data source syntax, not the Sisense syntax. Here is the Snowflake documentation for RANK. Can you take a look at that and let us know if it helps?

    Thank you.

  • Flo_Rod's avatar
    Flo_Rod
    03-12-2024

    Thank you DRay I ended up changing the SQL query  in the data model. The function I used was:
    DENSE_RANK() OVER (ORDER BY PURCHASE_DATE DESC) AS CC_PURCHASE_DATE_RANK
     This created the custom column I required.