Forum Discussion
Combined Line Plot
I'm trying to plot two line plots, one for the historical data and one for the forecast data combined into one chart.
I don't want to use the built-in PowerBI forecasting feature and populated the forecasts column from my own forecasting model.
In the attached table screenshot, historical data is shown from January 1, 2019 – January 10, 2019 and forecast data is shown from January 11, 2019 – January 21, 2019.
How do I plot this data so the forecast plot picks up from where the historical plot ends and the two plots are clearly distinguished?
I’ve attached an example of how the plots should be formatted as well (red = historical, white = forecast). Appreciate your help!
Hi Anonymous ,
Please refer to my .pbix file.
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- parry2kSuper User
Anonymous create two measures and As a best practice, add date dimension in your model and use it for and time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools.
https://perytus.com/2020/05/22/create-a-basic-date-table-in-your-data-model-for-time-intelligence-calculations/Use the date on the x-axis from date table and use below two-measure for values
Actual = SUM ( Table[Actual] ) Forecast = SUM ( Table[Forecast] )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- v-lionel-msftCommunity Support
Hi Anonymous ,
Please refer to my .pbix file.
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.