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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JuneZ123
Frequent Visitor

Question about ranking Rankx in monthly result

I want to show everyone's monthly ranking per Gross Margin $. However, some people ranking is incorrect. For example as below, this person Monthly ranking should be 4,6,4,6,3,1,1. In the chart, April and July ranking shows incorrectly. 

JuneZ123_0-1660600668403.png

My Dax as below, please advice. 

Monthly Ranking =
IF(
ISFILTERED(Employee[Person Name by Last]),
RANKX(
CALCULATETABLE(
Employee,
all(Employee[Person Name by Last]),
Employee[Pres. Club Elig]=TRUE()
),
[YTD GM]
),
BLANK()
)
 
Thanks!
3 REPLIES 3
v-mengzhu-msft
Community Support
Community Support

Hi @JuneZ123 ,

 

If it is convenient, can you send me a sample data or a PBIX file without private data for my testing?

 

Best regards,

Community Support Team Selina zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

yaowen
Frequent Visitor

It is suggested to cut the table data to make it clearer. Try this code:

Monthly Ranking =
IF (
    ISFILTERED ( Employee[Person Name by Last] ),
    RANKX ( ALLEXCEPT ( Employee, Employee[Person Name by Last] ), [YTD GM] ),
    BLANK ()
)

Thanks for the suggestion! I tried the DAX, it is not working properly. It shows as following.  

JuneZ123_0-1660752326149.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors