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, get a free DP-600 exam voucher to use by the end of 2024. Register 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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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