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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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