Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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
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!!
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?
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.
Thank you for your answer!
I will try this,
Best regards
Hampus
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.