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 Query preforming Very Slow.

Dear Experts,

Below Dax Measure perfomance very slow, Kindly advise the best solution,

NPS NetworkRank:
RANKX (
ALL (
Dim_Agent[Team_Lead_Complete_Name],
Dim_Agent[Supervisor_Complete_Name],
Dim_Agent[Manager_Complete_Name],
Dim_Agent[Director_Complete_Name],
Dim_Agent[CRC]
),
CALCULATE (
[_AvgNPSSelectionMTD],
Dim_Agent[_MissingHierarchy1] = "|||"
 
),
,
DESC,
SKIP
)

 

_Avg NPS Rank =
AVERAGEX (
KEEPFILTERS (
CROSSJOIN (
VALUES ( 'Dim_Agent'[Director_Complete_Name] ),
VALUES ( 'Dim_Agent'[Manager_Complete_Name] ),
VALUES ( 'Dim_Agent'[Supervisor_Complete_Name] ),
VALUES ( 'Dim_Agent'[Team_Lead_Complete_Name] ),
VALUES ( Dim_Agent[Job_Description] )
)
),
CALCULATE ( [_NPS_NetworkRank] )
)

Thanks & Regards,
Venkat.
2 REPLIES 2
v-lionel-msft
Community Support
Community Support

Hi @basirve ,

 

Review performance of measures, relationships, and visuals - Learn | Microsoft Docs

There are many factors that affect the query performance, and the DAX formula itself is only one of them.

Improve Power BI Performance by Optimizing DAX | MAQ Software

And maybe you can refer these.

NPS NetworkRank:
RANKX (
    ALL (Dim_Agent),
    CALCULATE (
        [_AvgNPSSelectionMTD],
        Dim_Agent[_MissingHierarchy1] = "|||"
    ), , DESC, SKIP
)

Avg NPS Rank = 
AVERAGEX (
    CROSSJOIN (
        VALUES ( 'Dim_Agent'[Director_Complete_Name] ),
        VALUES ( 'Dim_Agent'[Manager_Complete_Name] ),
        VALUES ( 'Dim_Agent'[Supervisor_Complete_Name] ),
        VALUES ( 'Dim_Agent'[Team_Lead_Complete_Name] ),
        VALUES ( Dim_Agent[Job_Description] )
    ),
    [_NPS_NetworkRank]
)

 

Best regards,
Lionel Chen

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

 

aj1973
Community Champion
Community Champion

Hi @basirve 

Can you please share a Sample Pbix! it's not easy to speculate on a solution.

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

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.