Forum Discussion
Drogov4122
3 years agoRegular Visitor
Calculating Variance between two categories and month
Hello, I am seeking to find the fuel price (last column) variance between DOM and FTZ (third column) for each month and year. I have tried a variety of calculations, including the Quick Measure feat...
tamerj1
Community Champion
3 years agoHi Drogov4122
Please try
Variance =
CALCULATE ( [Avg Fuel Price], 'Table'[DOM/FTZ] = "DOM" )
- CALCULATE ( [Avg Fuel Price], 'Table'[DOM/FTZ] = "FTZ" )Drogov4122
3 years agoRegular Visitor
Does not seem to work - I am guessing because "Avg Fuel Price" is also part of the same table (i.e: DOM/FTZ, MONTH, YEAR and AVG FUEL PRICE are all part of "WIP Table"
- tamerj13 years ago
Community Champion
Then try
Variance = CALCULATE ( AVERAGE ( 'WIP Table'[Avg Fuel Price] ), 'WIP Table'[DOM/FTZ] = "DOM" ) - CALCULATE ( AVERAGE ( [Avg Fuel Price] ), 'WIP Table'[DOM/FTZ] = "FTZ" )