Forum Discussion
Fanis_Georg
1 year agoRegular Visitor
Dynamic comparison of values
Hello team I have a table that i have the costs of the materials for the full year broken down by month. Each month that I am running the results i add it in the same excel right under the previo...
- 1 year ago
Fanis_Georg So perhaps something like this:
Current vs. Standard = VAR __Material = MAX( 'Table'[Material] ) VAR __TableCurrent = FILTER( ALL( 'Table' ), [ResultPeriod] = "Current" ) VAR __TableSTD = FILTER( ALL( 'Table' ), [ResultPeriod] = "STD" ) VAR __Current = SUMX( __TableCurrent, [Costing] ) VAR __STD = SUMX( __TableSTD, [Costing] ) VAR __Result = __Current - __STD RETURN __Result
Greg_Deckler
1 year agoCommunity Champion
Fanis_Georg Yeah, that's the joy of working with matrix visuals in Power BI. You have 2 options basically. Make everything a measure, so CP-1, Current, STD you would all make measures and then use all measures for the columns in your matrix. The other way is a custom matrix hierarchy:
The New Hotness (Custom Matrix Hierarchy) - Microsoft Fabric Community
Fanis_Georg
1 year agoRegular Visitor
Greg_Deckler Thank you, indeed. I created new measures for each period and it worked. Thanks