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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Eric5605
Helper I
Helper I

Show forecast value for a static date in KPI card

Hello, I have a Power BI line chart that shows weekly cumulative enrollment for a program.  Enrollment stops October 1, 2025.  The data is updated weekly with current enrollment the the line chart forecasts out 8 months.  Sometimes I will need to show this chart in a static presentation.  

 

I would like to have a KPI card that shows the forecast data point for 9/29/2025 which is the last forecasted data point before the end fo the month.  That forecast will change each week as actual enrollment data is added each week.  Is there a way to extract the forecast value for 9/29/2025 that I can view via the tooltip pop up.  When this is in a static presentation, the user won't be able to do that to see the data point.  Thanks!

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Assuming you have a calendar table and you build a slicer from the date column of the calendar table.  In the slicer select October 1, 2024.  Try this measure

Total = sum(Data[value])

Last value before selected date = calculate([Total],calculatetable(lastnonblank(calendar[date],calculate([Total])),datesbetween(calendar[date],minx(all(calendar),calendar[date]),max(calendar[date]))))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks so much!  I wasn't able to get the DAX measure to work.  Prob my novice knowledge 🙂 I wasn't sure if Total = and Last value before selected date = are two measures or one, but I kept receiving a syntax error.  However, I was able to use the export function on the line chart that has the forecast and export the forecast values to Excel.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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