Forum Discussion

Unicorn_Tech's avatar
Unicorn_Tech
Resolver I
6 years ago
Solved

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?

  • parry2k's avatar
    parry2k
    6 years ago

    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

  • 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_Tech's avatar
      Unicorn_Tech
      Resolver I

      @

       

      • parry2k's avatar
        parry2k
        Super 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.