Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

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 4
Kishore_KVN
Super User
Super User

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
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? 

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. 

Anonymous
Not applicable

Thank you for your answer!

 

I will try this,

 

Best regards 

Hampus

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors