Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jshumaker
Frequent Visitor

ranking from a calculated table

I am trying to add a ranking function to a calculated table but when I do that I get all 1's for the ranking.  Although if I export the data from the matrix to a .csv file, upload the data from the .csv file as a new table and then use the same DAX ranking function I get the correct results.   How do I get that function added to the following calculated table?

jshumaker_2-1684007979181.png

 

jshumaker_0-1684008327885.png

 

 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like, but please try something like below.

 

max pct rnk measure: =
RANK (
    skip,
    SUMMARIZE (
        ALLSELECTED ( 'fk01' ),
        'fk01'[column_name_that_shows_100_inthevisual],
        'fk01'[lkey0]
    ),
    ORDERBY ( CALCULATE ( SUM ( 'fk01'[max pct] ) ), DESC ),
    PARTITIONBY ( 'fk01'[column_name_that_shows_100_inthevisual] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like, but please try something like below.

 

max pct rnk measure: =
RANK (
    skip,
    SUMMARIZE (
        ALLSELECTED ( 'fk01' ),
        'fk01'[column_name_that_shows_100_inthevisual],
        'fk01'[lkey0]
    ),
    ORDERBY ( CALCULATE ( SUM ( 'fk01'[max pct] ) ), DESC ),
    PARTITIONBY ( 'fk01'[column_name_that_shows_100_inthevisual] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.