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
Anonymous
Not applicable

Problem with subtracting two columns in a matrix

I have a matrix table that shows the budget of investments. The matrix has 4 row categories: Location, Investment type, Description and Investment number. And the values are: Budget, Filling the budget as of Q1, Q1 Difference, Filling the budget as of Q2, Q2 Difference and so on..

The matrix should look something like this:

pbi 1.PNG

 

and I do get this result without the "Q1 Difference" calculation, but when I enter the calculation I get this:

pbi 2.PNG

 

As you can see it displays all the investment numbers (even when they don't apply to a certain Description, Investment type or location) under every description and the budget number multiplies behind all the investments. Only the "Filling the budget as of Q1" is behind the correct row.

 

I've tried with a regular Quick Measure, I've tried with =CALCULATE(SUM([Budget])) - CALCULATE(SUM([Filling the budget as of Q1])), which worked a couple of days ago, but then I had other things wrong with my Report and I've changed the queries since then quite a bit. Also tried doing the calculation with SQL, which works behind all the rows, but the grand total number will be off.

 

Been stuck on this problem for a while now, any help is appreciated.

1 REPLY 1
Anonymous
Not applicable

Hi  @Anonymous ,

 

Could you pls provide some sample data and expected output?Your description above doesnt make the issue clear...

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

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.