Forum Discussion
Anonymous
4 years agoNot applicable
Calculate difference between forecast (constant) and monthly values
Hi There, I have two tables; one contains the forecast values and the other contains values that increases with time (monthly). I want to subtract the maximum value for each record from the forec...
- 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
4 years agoNot applicable
v-xiaotang thanks for the response.
This method works however I have a little issue. Some of the location number have alphanumeric IDs. Is there a way to go around this?
Anonymous
4 years agoNot applicable
I got an error when I tried the formula.