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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JanaeWalker864
Frequent Visitor

Urgent Request: Dax to Obtain Current Forecast Qty Values

Hello, I have a table 'Historical Forecast' that stores all of the forecast submissions for the past 5 years. I can not seem to find a solution after reseraching on how to call the last forcast submitted for each individual month.  I am trying to get the values in orange " 'Historical Forecast'[SalesQty]". Below is my failed dax attempt. 

Current Forecast Qty = CALCULATE(
    LASTNONBLANK('Historical Forecast'[SalesQty], 1),
    FILTER('Historical Forecast', 'Historical Forecast'[Forecast As Of Date] = MAX('Historical Forecast'[Forecast As Of Date]))
)
I have also include an image below of the returned results. The results should match forecast qty but they don't. The reason I do not just use 'Forecast Qty' is because it doesn't have historical values, only current and future forecast. I am creating an report that historically evalutes the performance of the forecasts in the past. 
JanaeWalker864_0-1686916943243.png

 

JanaeWalker864_0-1686916440710.png

 

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.