Forum Discussion
Line Chart, with comparison time
Hello. I have a Line chart, showing pageviews over time.
I want to add a second line, comparing the date period chosen to the previous period.
Is there an easy way to do this?
Unicorn_Tech you need to set relationship between date table and your original table and then you can use parallelperiod function as described in the link.
6 Replies
- parry2kSuper User
Unicorn_Tech 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/Once you have date dimension in your model, you can use previousday, previousmonth, previousyear, all these time intelligence functions in your measure
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.⚡
- Unicorn_TechResolver I
@parry2k, that sounds like what I need exactly, but I might need a bit more of an explanation here. I have a single table, that has dates, and pageviews. I take it you aren't suggesting an additional column, and I did build a seperate table of Dates, per the link you hd put in.
Currently, the date table I created and my original table are unrelated. How does the Timeline dax fit into this now?
I think the timeline feature I'm most interested in is PARALLELPERIOD- parry2kSuper User
Unicorn_Tech you need to set relationship between date table and your original table and then you can use parallelperiod function as described in the link.