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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Different data used before and after the current date/ stacked bar and line chart.

Hi there,

 

I'm in the process of creating a stacked bar and line chart, with months on the x axis. For the bars, I want Data1 used up until TODAY() and then another column (predictions) used for the remaining bars through the year.

 

Can this be done?

 

Regards.

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

If you create separate measures to show actual values from the past and predictions for the future then you can combine them in 1 measure for plotting on a graph, e.g.

 

Measure For Visual =
var maxDate = MAX( 'Date'[Date] )
RETURN IF ( maxDate > TODAY(), [Prediction Measure], [Actual Value Measure] )

 

View solution in original post

4 REPLIES 4
johnt75
Super User
Super User

If you create separate measures to show actual values from the past and predictions for the future then you can combine them in 1 measure for plotting on a graph, e.g.

 

Measure For Visual =
var maxDate = MAX( 'Date'[Date] )
RETURN IF ( maxDate > TODAY(), [Prediction Measure], [Actual Value Measure] )

 

Anonymous
Not applicable

@johnt75 Perfect, thank you so much! Do you know if there's a way of producing a vertical line (on the combo chart) which indicates todays date? So you can clearly see actual vs forecast?

Sorry, visuals aren't my area of expertise. HowToPowerBI is a good Youtube channel, though, and Baz often covers things like that. You may find something there

amitchandak
Super User
Super User

@Anonymous , I think you need two measures

example measure before today

CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] <=today()) ) 

 

example measure after today

CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] > today()) ) 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors