Forum Discussion
BOkungbure
2 years agoRegular Visitor
Matrix Calculation on 1st and 2nd Level
Hello Everyone, I have a table that has data arranged into main sections and subsections as shown below. Main Section Sub Section Value Section A Sub Section 1 10 Section A Sub Sec...
- 2 years ago
Hello BOkungbure,
Can you please try this:
1. Calculate the Maximum Total across all Sections
Max Total Value = MAXX( ALL('YourTableName'[Main Section]), SUMX( FILTER( 'YourTableName', 'YourTableName'[Main Section] = EARLIER('YourTableName'[Main Section]) ), 'YourTableName'[Value] ) )2. Calculate the Ratio
Ratio = VAR MainSectionTotal = SUMX( FILTER( 'YourTableName', 'YourTableName'[Main Section] = EARLIER('YourTableName'[Main Section]) ), 'YourTableName'[Value] ) VAR CurrentValue = IF( ISINSCOPE('YourTableName'[Sub Section]), SUM('YourTableName'[Value]), MainSectionTotal ) RETURN DIVIDE(CurrentValue, [Max Total Value])Should you require any further assistance, feel free to reach out to me.
- 2 years ago
Thanks Sahir,
This solution was super helpful, ISINSCOPE was the missing piece
BOkungbure
2 years agoRegular Visitor
Thanks Sahir,
This solution was super helpful, ISINSCOPE was the missing piece