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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors