Showing results for 
Search instead for 
Did you mean: 
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

Super User IV
Super User IV

Re: POWER BI SUMX + measure slow

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

Re: POWER BI SUMX + measure slow



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. 

Community Support
Community Support

Re: POWER BI SUMX + measure slow



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

New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors