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

Calculate Function that sums for each row tier in a matrix

Hello,

 

I have a matrix that breaks down into 5 rows. Row 1 will break into multiple Row 2 items, Row 2 breaks down into multiple row 3 items, and so on until the fifth row. 

 

I have built a calculate function that compares two columns in the matrix and returns a 1, or a 0 as seen below: 

 
Reconciled = CALCULATEIF( (SUM( COLUMN1 ) -( SUM ( COLUMN2 )<1,1,0) )
 
My issue is the following - this calculate function is recalculated for each row level, so if I am viewing at Row 5, it will return a 1 or a 0 for each row. However, if I am viewing at row 3 it still only returns a 1 or a 0 for each row 3 item (This is not what I want), ideally I would like it to display the sum of 1's and 0's at the row 5 level. So if collapse my table to row 3 and there were 10 items in row 5 that had a value of 1, at row 3 I would want it to display 10, not 1 or 0. 
 
Note: the values in Column 1 and Column 2 will not appear in the same row in the raw data, this is why I cannot simply create a new column and add that up, SUMS of column 1 and column 2 must be compared at the Matrix row levels. 
 
Let me know if you have any questions, any help would be greatly appreciated

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create  a measure Reconciled  and then create a table with row values 0,1

 

then use the bucketing using item

refer

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Create  a measure Reconciled  and then create a table with row values 0,1

 

then use the bucketing using item

refer

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.