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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
HariBPujari
Frequent Visitor

DAX RANKX start at 2 instead of 1 in ASC but fine in DESC.

I write a DAX measure:

Rank by Value =
IF(ISINSCOPE(Sheet1[Value]),
RANKX(
    ALLSELECTED(Sheet1[Value]),
    [Total Value],,ASC,Dense
))
 
but rank start at 2 instead of 1 in ASC, but if i put DESC instead of ASC, it start at 1. I am not getting what is going on with my DAX code.
 
Here is Sample Data:
Item                            Value 
A                           100.00
A                           200.00
A                           300.00
A                           400.00
A                           500.00
A                           600.00
A                           700.00
A                           800.00
A                           900.00
A                        1,000.00
B                        1,100.00
B                        1,200.00
B                        1,300.00
B                        1,400.00
B                        1,500.00
C                        1,600.00
C                        1,700.00
D                        1,800.00
D                        1,900.00
E                        2,000.00

and here is the result, you can see in every Item it start at 2:

HariBPujari_0-1694793515246.png

 

Can anyone help me?



1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

Rank by Value.pbix

 

ThxAlot_0-1694799931937.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

2 REPLIES 2
ThxAlot
Super User
Super User

Rank by Value.pbix

 

ThxAlot_0-1694799931937.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Thanks you, it worked. But still I am not getting what was wrong with my measure. Can you please explain?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.