Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
TODEI
Frequent Visitor

Use Date measures to select forecast or actuals.

Hej,

 

I have forecasts that start in the middle of the Fiscal year. I would love to still compare the forecast to the total years actuals. So let's say the fiscal year is from Jan-Dec, the forecast is from June-Dec. I would love to have one combined value that uses actual data for the months not forecasted and forecast data for the months that have been forecasted in June. Kind of like this:

 

MonthForecastActualsForecast incl. Actuals
Jan 

3000

3000

Feb 36003600
Mar 38003800
Apr 40004000
May 50005000
Jun

5000

40005000
Jul450060004500
Aug4600 4600
Sep4800 4800
Oct4900 4900
Nov4600 4600
Dec5000 5000

 

So far Ive tried the following but I can't access my data without an aggregation function:

 

m3 Forecast incl Actuals = If(Base[Forecast Date]<=Base[Date],'Key Measures'[m3 Forecast], 'Key Measures'[m3 Actuals])

 

 

Anyone know how to do this?

 

Thank you!

2 REPLIES 2
amitchandak
Super User
Super User

@TODEI , Try like

m3 Forecast incl Actuals =
var _min = minx(Filter(allselected(Base), Not(isblank([forecast])) ), Base[Date])
return
If(max(Base[Forecast Date])<=_min,'Key Measures'[m3 Forecast], 'Key Measures'[m3 Actuals])

Sadly it is only showing forecast data now and no actuals. I'll try to play around with it a bit and see if I can find a solution.

 

I did learn that you can use variables! So thank you for that 🙂

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.