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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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