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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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