Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Doing Row Number or Rankx on Power BI Direcy Query

Hi,

 

I am working on Ranking the table visual rows based on the Redemptions values in Power BI Desktop Report Server. Please help me with a measure to be able to achieve it. Please note RANKX function is not enabled in my Desktop version.

 

Here is the output I am looking for, doing Row number on zip based on Redemptions count. I appreciate your help. Thank You!

 

 ZIPRedemptionsRow Number
336076546301
11355282
10031243
10454224
945504200215
  • Anonymous 

     

    The following DAX works for me. Upgrade the version and make sure it is a measure, not calculated column.

    Measure =
    RANKX ( ALLSELECTED ( Query1[ZIP] ), CALCULATE ( SUM ( Query1[Redemptions] ) ) )
    

     

3 Replies

  • v-chuncz-msft's avatar
    v-chuncz-msft
    Icon for Community Support rankCommunity Support

    Anonymous 

     

    The following DAX works for me. Upgrade the version and make sure it is a measure, not calculated column.

    Measure =
    RANKX ( ALLSELECTED ( Query1[ZIP] ), CALCULATE ( SUM ( Query1[Redemptions] ) ) )