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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Rankx is not working properly for me

manap_0-1615732855327.png

Hello all. I have the following table and trying to rank the regions according to the ECI column. As you see can see, the ranking shows weird results. Additionally, I have a date filter, which rankings must change according to the yearly values. I have tried this formula:

 

Rank =

RANKX (
ALL ( 'eci_all_kz (2)'[final_eci], 'eci_all_kz (2)'[Date]),
CALCULATE ( SUM ( 'eci_all_kz (2)'[final_eci]) ),,DESC
 
)
Can you please help to solve the issue?
 
 
1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Download example PBIX file

 

You need to pass in the Region column inside ALL() not the final_eci column.

 

Use this to create a measure

Rank = RANKX ( ALL ('eci_all_kz (2)'[Region]), CALCULATE ( SUM ( 'eci_all_kz (2)'[final_eci]) ) ,,,dense)

ranks1.png

 

 

or a column

 

Ranks = RANKX (  'eci_all_kz (2)', [final_eci] )

 

 

I don't understand what you mean by this Additionally, I have a date filter, which rankings must change according to the yearly values  - please give an example. 

 

You need to explain what you mean by that and also show the dates you have in the eci_all_kz (2)'[Date] column

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Download example PBIX file

 

You need to pass in the Region column inside ALL() not the final_eci column.

 

Use this to create a measure

Rank = RANKX ( ALL ('eci_all_kz (2)'[Region]), CALCULATE ( SUM ( 'eci_all_kz (2)'[final_eci]) ) ,,,dense)

ranks1.png

 

 

or a column

 

Ranks = RANKX (  'eci_all_kz (2)', [final_eci] )

 

 

I don't understand what you mean by this Additionally, I have a date filter, which rankings must change according to the yearly values  - please give an example. 

 

You need to explain what you mean by that and also show the dates you have in the eci_all_kz (2)'[Date] column

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.