cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jllane
New Member

Using a calculated measure by filtered date in future months

I am trying to use a calculated measure from the last date in my dataset for future months to forecast. Because I am filtering the value based on a specific date, it does not recognize it when I try to use this value for future months.

 

I flagged the month, hard coded for now, then identified the value at that date. 

History Stop Date = IF('*Calendar'[Date]=DATE(2022,1,1),"Y","N")
Forecast Start = CALCULATE([Forecast],'*Calendar'[History Stop Date]="Y")
 
When I try to use the Forecast Start in calculations post 1/1/2021, it returns blanks. How can I grab this value to use in future calculations? Thanks!
2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @jllane ,

You can change [Forecast Start ] to the following form:

Forecast Start =
CALCULATE(MAX('Calendar'[Forecast]),FILTER(ALL('Calendar'),'Calendar'[History Stop Date]="Y"))

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

David-Ganor
Resolver II
Resolver II

Hi @jllane ,

 

I'd like to ask for some clarification please.

Does the calender table has any relationship (connected) with the fact table which [forcast] is referring to?

Is there any value for [forcat] at 1/1/2021?

Thanks!

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors