Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Help with comparing diffrent year from a timeseries

Hi,

 

I want to compare diffrent years in a graph. I want that the lines from diffrent years shall lay over each other. 

 

The format for the dates is in hour: 2020-01-01 00:00, 2020-01-01 01:00...... an so on.

 

I want to show all the hours. The data is in an sql server that i own, so it is also possible to do some work there. 

 

Can some one help me, please! I tried for a long time to do this. 

 

Thank You 

Hampus 

4 Replies

  • Hello Anonymous , 
    Firstly duplicate this date column in Power Query and just keep only dates in one column. 
    Then create a calendar table and create relationship with this date column.

    Then create your calculations for previous year comparions and in the visual in X-Axis provide the actual column which contains both date and time and in values add the measure that you have created. This will help you to achieve your requirement. 

     

    If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you,

       

      but I do not really understand what you mean witha a calander table? And do you mean that I shall extract the date from the time? 

      • Kishore_KVN's avatar
        Kishore_KVN
        Icon for Solution Sage rankSolution Sage

        Yes, duplicate this column in power query and change the new column only to date in the data type. 

        Then you have to create new calendar table either in Power Query or in Power BI Desktop. Then follow the steps that I have provided.