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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

How to get date and hour in the x-axis for a line chart.

Is there any method to arrange the hour in increasing order for the below visual. In x-axis i want to see the count with date and hour both, eg: 21-09-2020 0, 21-09-2020 1 21-09-2020 2 ---- 21-09-2020 24 and then the next date starts (date hour format)

 

vimina_vinod_0-1600842804230.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , make sure date is date and hour is in number. And try Concat label off mode or on mode.

 

Screenshot only show the option

 

Concat2.pngConcat 1.png

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
Sumanth_23
Memorable Member
Memorable Member

hi @Anonymous - you can create a calculated column to derive the Year+Month+day+hour in the format required for your report and sort the same by date time field available in your data 

 

1. You can derive the year, month, day and hour from your dateime field in Query editor as seen below 

Sumanth_23_1-1600845034620.png

 

2. Create the calculated column to use in your reporting:

Report Date-Hour = 'Z-DateTime-Sort'[Year] & 'Z-DateTime-Sort'[Month] & 'Z-DateTime-Sort'[Day] & "-" & 'Z-DateTime-Sort'[Hour]

 

3. Sort your Report Date-Hour field by the date time field in your data 

Sumanth_23_0-1600846090345.png

 

Sort Datetime2.png

 

Please mark the post as a solution and provide a 👍 if my comment helped with solving your issue. Thanks!

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!

Proud to be a Super User!



amitchandak
Super User
Super User

@Anonymous , make sure date is date and hour is in number. And try Concat label off mode or on mode.

 

Screenshot only show the option

 

Concat2.pngConcat 1.png

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Thank you for the help. Now I have a concern that I need the date to be displayed only once (eg: 17-09-2020 0 to 24 hrs then 18-09-2020 0-24 hrs and so on) because the visual is looking conjested. And also Is there any way to remove the scroll bar so that i can display the 7 relative date in a single visual and without the scroll bar.

 

vimina_vinod_0-1600873248936.png

 

hi @Anonymous, 

 

1. You can adjust the page width by changing to custom and adjusting to the width required - as seen in the below screenshot 

 

Sumanth_23_0-1600874247105.png

 

2. You can use the date hierarchy Uwithout quarter and the derived hours to display as seen below - this will the X-axis look less cluttered

 

Sumanth_23_1-1600874340816.png

 

Please mark the post as a solution and provide a 👍 if my comment helped with solving your issue. Thanks!

 

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!

Proud to be a Super User!



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.