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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!