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
Peter_Sun
Frequent Visitor

POWER BI SUMX + measure slow

Hi All, 

 

I manage to calculate below two measures. and the 2nd step is built on the measure from 1st Step. 

 

1st Step:

DP = CALCULATE( DISTINCTCOUNT( FACT_Sales[Item Name]), ALLEXCEPT(FACT_Sales, FACT_Sales[Customer Name]), FILTER( FACT_Sales, FACT_Sales[Item Order Amt CNY] >0))

 

2nd Sep:

DPs Total = SUMX( VALUES(FACT_Sales[Customer Name]), 'Key Measures-DPs'[DP])

 

However, the report became extremely slow to refresh based on my  slicers like Date or Channels after the second DAX-DPs Total.

 

Would you please check if I can optimise this DAX formula to improve the performance?

 

Thanks You all

3 REPLIES 3
GilbertQ
Super User
Super User

Hi @Peter_Sun

 

With your second measure what are you trying to get the result of for your measure?

 

Is it a total of all Customers?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Hi, 

 

The measure I am trying to get is tell me how many listings I have in my business scenarios. 

 

One listing means a product sold to one customer. 

 

For example, 

 

If one product sold to two customers, we have two listings or 

If two products sold to one customer, we have two listings as well. 

 

Or do you have any other better measures to calculate this out?

 

really thanks for your help. 

@Peter_Sun,

 

You may also try calculated table.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.