Forum Discussion
Combining Forecast and Actual Data with Different Time Ranges in One Power BI Visual
- Anonymous1 year ago
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.