Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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.
Solved! Go to Solution.
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] )
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] )
@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
@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()) )