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

How to sum the remainder of a subtraction from a measure to the next row of a different measure?

Hello everyone,

I'm trying to achieve the following (even though I'm not sure it's achievable):

I have a matrix with a few columns. All of the values in the matrix are measures, only the year column is an actual column. Everything else are measures.

The last column "To execute" is calculated by subtracting ("Grand total" - "Executed"). If there is a positive value in this column, I need to add it to the next year's grand total. In this case, the grand total for 2024 would be the initial 300 + the remaining 150 from the last column.

ftmanoel_2-1675355028602.png

Considering this table is entirely made of measures and not calculated columns, and therefore I don't have row indeces, is this possible? 

Extra info, in case it is relevant:

  • The year column comes from a calendar table that is related to all the tables I need to calculate my measures (3 different tables);
  • This is probably irrelevant but, in case anyone is wondering, I am using a matrix instead of a table because I was requested to present the totals row in the first row instead of last, and I could only make that happen was with a matrix (as far as I know). 

Thank you in advance to anyone who might take the time to analyze this.

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

you should avoid computing with nested measures. Instead, apply the entire business logic in its own measure.

 

Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

 

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.