Forum Discussion
LE forecast
- 6 years ago
If you actual and forecast is joined with date table.
Ideally, you should create a month start date in the forecast table and join with the same date table. If now do so. I am not sure of Month format, I can suggest one
You can measure like
QTY actuals = Sum(actuals[QTY])
QTY forecast= Sum(forecast[QTY])
if(eomonth(Today(),-1)<=max(Date[Date]), Sum(actuals[QTY]) , Sum(forecast[QTY]) )
- 6 years ago
This is how i solved it
LE Changing =var _SF = EOMONTH(max('Dates Slicer'[DateKey]),-1)Returnif(_SF < max(Dates[DateKey]), 'Forecast Consol'[Current Month Forecast], 'Actual Consol'[Contract Actuals])LE Current =var _LASTMONTH= EOMONTH(today(),-1)Returnif(_LASTMONTH < max(Dates[DateKey]), 'Forecast Consol'[Current Month Forecast], 'Actual Consol'[Contract Actuals])
Hi,
Yes my actuals and my forecast tables have a relatioship with a date table.
SF month | Month (source - Date table - related to Forecast on month column and to Actual on Month) | Actual QTY Measure | Forecast cons QTY - | LE - the measure I need |
March 2020 | Jan 2020 | 1 |
| 1 |
March 2020 | Feb 2020 | 2 |
| 2 |
March 2020 | March 2020 | 3 | 4 | 4 |
March 2020 | Apr 2020 | 2 | 4 | 4 |
March 2020 | May 2020 |
| 7 | 7 |
March 2020 | Jun 2020 | 9 | 9 |
The measure I need to do in Power BI is to get the LE column I added -
if(EOMONTH(SF month, -1)> Month, Actual QTY, Forecast QTY)
It needs to be dynamic..
Thanks amitchandak !
This is how i solved it