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
basirve
Helper III
Helper III

Dax Rank Calculation is performance issue

Dear Experts,

 

I would calculating the ranking @Director level and used the below Measure

[_Overall_ranking_Weightage] is a weightage Measure,and we were calculationg the rank based on this measure.

Director Rank =
RANKX (
ALL ( Dim_Agent[Director_Complete_Name] ),
CALCULATE (
[_Overall_ranking_Weightage],
Dim_Agent[Job_Cd] IN { "DCYA", "DCGG", "DCXB", "DCX1", "DCDD" }
),
,
ASC,
DENSE
)
 
Issue: Blank values also calculating the rank and its starting from 1 (Blank values)
 
to achive this issue , I have written another dax formula like below but it was performing very very slow(Bad Perfomance)

IF (
NOT ( ISBLANK ( [_Overall_ranking_Weightage] ) ),
RANKX (
FILTER (
ALLSELECTED (
Dim_Agent[Director_Complete_Name]
 
),
NOT ( ISBLANK ( [_Overall_ranking_Weightage] ) )
),
[_Overall_ranking_Weightage]
,,ASC,
Dense
)
)

@Dear Experts,
Could you please suggest the best solution on this.
 
Thanks & Regards,
Venkat 
7411002501
 
3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi @basirve ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it.

 

Best Regards,
Eyelyn Qin

v-eqin-msft
Community Support
Community Support

Hi @basirve ,

 

Please try to apply [_Overall_ranking_Weightage]<>BLANK() to filter like this:

 

Director Rank = 
RANKX (
ALL ( 'Dim_Agent'[Director_Complete_Name] ),
CALCULATE (
[_Overall_ranking_Weightage],
FILTER('Dim_Agent','Dim_Agent'[Job_Cd] IN { "DCYA", "DCGG", "DCXB", "DCX1", "DCDD" } && [_Overall_ranking_Weightage]<>BLANK())
),
,
ASC,
DENSE
)

 

 

If it does not make sense, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

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

lbendlin
Super User
Super User

Please provide sample data in usable format (not as a picture) and show the expected outcome.

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.