The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi everyone,
I'm currently working on a Power BI report where I want to display both forecast and actual data in a single visual. However, the two data types should be shown over different time ranges:
Actual data: up to 100 days in the past
Forecast data: from tomorrow (D+1) to D+5
Both data types are stored in the same table and can be distinguished by a column like DataType (e.g., "Actual" vs. "Forecast").
Goal: I want to use a line chart (or a similar visual) where the x-axis covers the full range from D–100 to D+5, but:
Only actual data is shown for past dates
Only forecast data is shown for future dates
Ideally, no overlap on today's date, or showing just one of the two
I'm not sure whether to approach this with DAX filters, visual-level filters, or perhaps a calculated column in the data model.
Has anyone dealt with a similar situation or have suggestions on how to implement this cleanly?
Any help is much appreciated!
Solved! Go to Solution.
Hi @Cap91,
Thanks for reaching out to the Microsoft Fabric Forum Community.
Try using this measures to show different lines for Actual and forecast values
ActualValue =
CALCULATE(
SUM('YourTable'[Value]),
'YourTable'[DataType] = "Actual",
DATESINPERIOD('Date'[Date], TODAY(), -100, DAY)
)
ForecastValue =
CALCULATE(
SUM('YourTable'[Value]),
'YourTable'[DataType] = "Forecast",
DATESINPERIOD('Date'[Date], TODAY() + 1, 5, DAY)
)
If this helped, please mark the response as the accepted solution and give it a thumbs-up so others can benefit too.
Best regards,
Prasanna Kumar
Hi @Cap91,
Just a gentle reminder has your issue been resolved? If so, we’d be grateful if you could mark the solution that worked as Accepted Solution, or feel free to share your own if you found a different fix.
This not only closes the loop on your query but also helps others in the community solve similar issues faster.
Thank you for your time and feedback!
Best,
Prasanna Kumar
Hi @Cap91,
We wanted to kindly check in to see if everything is working as expected after trying the suggested solution. If there’s anything else we can assist with, please don’t hesitate to ask.
If the issue is resolved, we’d appreciate it if you could mark the helpful reply as Accepted Solution it helps others who might face a similar issue.
Warm regards,
Prasanna Kumar
Hi @Cap91,
Just following up to see if the solution provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.
If the response addressed your query, kindly mark it as Accepted Solution and click Yes if you found it helpful this will benefit others in the community as well.
Best regards,
Prasanna Kumar
Hi @Cap91,
Thanks for reaching out to the Microsoft Fabric Forum Community.
Try using this measures to show different lines for Actual and forecast values
ActualValue =
CALCULATE(
SUM('YourTable'[Value]),
'YourTable'[DataType] = "Actual",
DATESINPERIOD('Date'[Date], TODAY(), -100, DAY)
)
ForecastValue =
CALCULATE(
SUM('YourTable'[Value]),
'YourTable'[DataType] = "Forecast",
DATESINPERIOD('Date'[Date], TODAY() + 1, 5, DAY)
)
If this helped, please mark the response as the accepted solution and give it a thumbs-up so others can benefit too.
Best regards,
Prasanna Kumar
Hi @Cap91 I think you can do this by creating a calculated column like DisplayData to filter rows based on date and type. Use DAX logic to show "Actual" for past dates and "Forecast" for future dates, prioritizing one for today. Apply a visual-level filter to include only rows where DisplayData = "Show". Set the x-axis to continuous and span the full range, optionally using conditional formatting to distinguish Actual and Forecast data.