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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
ramutd54
Advocate I
Advocate I

RANKX Measure issue

Hi I am facing one problem while  generating ranks based on total requests by date . i am getting different results.

here 2016 june 18  have 48 no of total requests are there .. As per my logic it should be first rank but the rsult is coming  reverse.

date_rank=

Rankx(all(table1(Open Date]),table1[Total Requests],,,Dense) 

here [total Requests] is a calculated measure logic = count( table1.reqno)

here my rank should start from 1 to  48 hhere my rank should start from 1 to 48 hPlese help me  how to get the desired ranks...

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

Hi @ramutd54

 

Try adding the SORTOrder parameter

 

date_rank =
RANKX ( ALL ( table1[Open Date] ), [Total Requests],, DESC, DENSE )

 

After applying   the  above logic i am etting same  rank for all dates..

 

date_rank = RANKX ( ALL ( table1[Open Date] ), [Total Requests],, DESC, DENSE )

 

 I am geting  1 for all datesI am geting 1 for all dates

Hi @ramutd54

 

And all this happened just by adding "DESC"???  Smiley Surprised

 

Could you share your file?

 

Give this a try

 

date_rank =
RANKX ( ALL ( table1 ), [Total Requests],, DESC, DENSE )

 

 

Hi   Zubair Mohammad,

 

after couple of  testings finally i have  got  the desired output. the logic below is 

 

rank_date = rankx(allselected( table1[Open Date]),calculate(count(table1[Req. No.])),,,Dense)

 

There's no filters in this report. here i have appliced year slicer and also the dats is changing dynamically as  expected...

 

now i want to implement another concept  with this result. 

 

i want to  filter the ranks based on slicer selection like top 5 ,10,15,20,.....like that.

 

 

 

rank_issue3.JPGhere  rank result is coming as  expected if i change any  selection  on year slicer.here rank result is coming as expected if i change any selection on year slicer.

thanks for your  support..

 

I am going to  apply the top 5 10 15 slicer  if any issues  i will come back to you ...

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors