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
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

 

Share with Power BI Enthusiasts: 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

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.