Forum Discussion
B_Ed1978
3 years agoNew Member
totals help
Hi There I have a measure where if I don't have an actual I use a forecast, this measure works well at the monthly level , but I am not sure why I can't get my total to work. Actuals - $8,335,806 (J...
- 3 years ago
Hi,
I am not sure how your datamodel looks like, but please try something like below whether it suits your requirement.
ACT / FCT = SUMX ( DISTINCT ( 'TableName'[Period Month] ), CALCULATE ( IF ( SUMX ( 'FY23 Data', 'FY23 Data'[ACT] ) = BLANK (), SUMX ( 'FY23 Forecast', 'FY23 Forecast'[FCT] ), SUMX ( 'FY23 Data', 'FY23 Data'[ACT] ) ) ) )
amitchandak
Super User
3 years agoB_Ed1978 , try like
ACT / FCT =
var actuals = sumx('FY23 Data','FY23 Data'[ACT])
var forecast = sumx('FY23 Forecast','FY23 Forecast'[FCT])
var result = sumx(Values(Table[Period]) , calculate( if(actuals=blank(),forecast,actuals)) )
return
result