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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
wchristiang
Frequent Visitor

How to calculate a Column Subtotal having the result sum of coluns

I have the following example of a situation in a Power BI matrix:

 

 

MONTH 1

MONTH 2

TOTAL

VALUES

5

2

2,85

 

See that the result of my DAX formula in month 1 is 5 and in month 2 is 2.

So the sum should be 7, but bringing 2.85.

What’s the point of that?

Answering: The formula DAX has sum, multiplication and division causing that month to bring a result and the total that is the formula applied in the two months bring another one.

 

Example:

Month 1

(3 + 7) / 2 = 5

Month 2

(6 + 4) / 5 = 2

Month 1 and month 2 together the total is considered the sums of dividends by the sum of the divisors of the two months together to bring 2.85 as a result as follows:

(3 + 7 + 6 + 4) / (2 + 5) = 2,85

Is there any way for the total column that is already automatic from Power BI as shown below, to sum the columns and bring the value 7 instead of 2.85?

wchristiang_0-1708451696016.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @wchristiang,

This sounds like a common issue appears when you try to apply multiple aggregations in measure expressions.
For this scenario, you can refer the Gerg’s blog to know more about this and how to handle it.

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @wchristiang,

This sounds like a common issue appears when you try to apply multiple aggregations in measure expressions.
For this scenario, you can refer the Gerg’s blog to know more about this and how to handle it.

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

In the mentioned example in this post I exemplified the logic of the problem, but in my case I’m using a very complex DAX, whose data source is recalculated several times in a big formula, where the final values are results of several tables with various calculated attributes

In the example of the resolution posted in Measure Totals, The Final Word is suggesting to use SUMMARIZE and HASONEVALUE, but for both I have to use one table and one attribute of the table, but as I said before, the origin of my data have already been well modified until I have the example I quoted, so I can’t point out a single table and a single attribute, because the information is the result of multiple calculations of multiple tables and attributes with different conditions.

How can I proceed in this case?

If anyone can help me I can forward the pbix file and show the exact point in your e-mail.

Thank you.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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