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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Juanes_Agudelo
Frequent Visitor

DAX error calculating Pareto

Hi everyone,

I'm trying to calculate which customers are responsible for 80% of the YTD revenue in my model, based on the month selected by the user via the 'Calendar'[Month Year] slicer (e.g., Mar 2025).

The [Selected_Revenue YTD] measure works as expected — it correctly calculates revenue from January 1st up to the selected month.

The issue is when a customer has no records in the selected month, even though they have YTD revenue from earlier months. In those cases, my Pareto cumulative measure (Pareto Line YTD) incorrectly returns 100% (Image 2 below), and the customer seems to be missing from the visual.

For example, in the case of "ROTHESAY LIFE PLC" in February 2025, the measure shows 100% even though they had revenue in previous months. To debug this, I added conditional formatting (red background) to the table — and as seen in the attached screenshot, the cell is not highlighted, indicating that the customer row is not properly evaluated.

Image1:

 

Juanes_Agudelo_0-1747229174492.png

Image 2

Juanes_Agudelo_2-1747229436444.png

 


Image 3

Juanes_Agudelo_1-1747229356387.png

 

 

I've tried multiple variations of the Pareto measure, but the issue persists.

Measure until selected month YTD: 

Juanes_Agudelo_4-1747229736717.png

 

Cumulative pareto percentage (Some AI help. Pretty code but not the expected result):

Juanes_Agudelo_5-1747229880659.png

 

 

The model is pretty simple — just two tables, as shown in image below.

Juanes_Agudelo_3-1747229660768.png

 

Any help or suggestions would be greatly appreciated!

Thanks in advance!

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

I think that the problem arises because you are using the customer data from the fact table, not from the customer dimension table. When you are using SUMMARIZE( ALLSELECTED( 'Fact_Revenue'[Customer] ) ) that will only retrieve customers who have a row in the fact table for the selected month. You could instead use SUMMARIZE( ALL( 'Fact_Revenue'[Customer] ) ) or use a column from the customer dimension table instead.

You could also simplify your Selected Revenue YTD measure to

Selected Revenue YTD =
CALCULATE ( [Revenue], DATESYTD ( 'Calendar'[Date] ) )

That won't fix the problem, but it is easier to read and might give a small performance boost.

View solution in original post

3 REPLIES 3
johnt75
Super User
Super User

I think that the problem arises because you are using the customer data from the fact table, not from the customer dimension table. When you are using SUMMARIZE( ALLSELECTED( 'Fact_Revenue'[Customer] ) ) that will only retrieve customers who have a row in the fact table for the selected month. You could instead use SUMMARIZE( ALL( 'Fact_Revenue'[Customer] ) ) or use a column from the customer dimension table instead.

You could also simplify your Selected Revenue YTD measure to

Selected Revenue YTD =
CALCULATE ( [Revenue], DATESYTD ( 'Calendar'[Date] ) )

That won't fix the problem, but it is easier to read and might give a small performance boost.

You were right on "that will only retrieve customers who have a row in the fact table for the selected month".

 

For people with similar issue, the solution to work with a Dimention table AND remenber to Add to the visualisation the customer field from the dimentional table. Otherwise, it will not work.  

I dont have a Customer dimension table. but your statement "that will only retrieve customers who have a row in the fact table for the selected month" makes me think that your approach is correct. I will create a calculated Customer table and I will share results. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.