Forum Discussion
Calculate difference between forecast (constant) and monthly values
- 4 years ago
Hi Anonymous
You can try this measure,
diff = var _forecast= MAXX(FILTER(forecast,forecast[Location number]=MAX('Table'[Location number])),[Forecast value]) return _forecast-MAX('Table'[Value])if you need calculated column, try this,
Column = var _forecast= MAXX(FILTER(forecast,forecast[Location number]=EARLIER('Table'[Location number])),[Forecast value]) return _forecast-'Table'[Value]Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , Make sure both tables are joined with the common location table
Sum(Table[Forecast Value]) - Sum(Table2[Value])
Should work
or
sumx(Values('Date'[Month Year]), calculate(Sum(Table[Forecast Value]) - Sum(Table2[Value]) ) )
best it to have crossjoin with distinct monthstart date and join with date table
new Table= crossjoin([Table], distinct('Date'[Month Start Date]) )
again the first measure will work
- Anonymous4 years agoNot applicable
amitchandak thanks for the response.
I tried both methods but I got the same difference value for each location number which is not what I want.