Forum Discussion
fourmj
4 years agoFrequent Visitor
Conditionally Sum or Average a Column based on dimension table values
Hello, I have a fact table that contains Forecast data for particular business divisions. The forecast works as such: On the last day of the quarter, there are 9 future quarters that provide forecast...
tamerj1
4 years agoCommunity Champion
Hi fourmj
Please try
MyMeasure =
IF (
MAX ( '1_model_calc'[Calculation Type] ) = "Average",
SUMX (
VALUES ( 'Forecast'[Sub-Division2] ),
CALCULATE ( AVERAGE ( 'Forecast'[Values] ) )
),
SUM ( 'Forecast'[Values] )
)fourmj
4 years agoFrequent Visitor
Thank you, this measure works. I also tried it on a different set of data that is similar to the sample data in this post and it worked with some modification.
Thank you for providing me with insight on solving this problem.