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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.