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
Hello,
I created a line graph on my project with X-axis being a column, Hour Extended, in my Time table (... "Hour Extended", FORMAT([TimeandDay], "H AM/PM"),...) and Y-axis being a column, Lemonade, in my Drinks table (SearchHistory = COUNTROWS(SearchHistory)). The Hour Extended column was added as column to a blank table and the Lemonade column was added as a calculated column my main table Drinks.
Please use the interpretation of an image below and the picture as guidance. In a general solution, how should I go about creating a line graph without the sorting of times. I do not want to explicitly explore the time by hours maximum to minimum, but would like to see every hour in order morning to afternoon. Thank you for any help. If the post information is not helpful, any general solution or approach would be much appreciated.
Current graph:
|
|
| Line graph goes here
|
|
|
______________________________________________________________________
12PM 3PM 5PM 9AM 11AM 6PM 10AM
My expectation:
|
|
| Line graph goes here
|
|
|
______________________________________________________________________
9AM 10AM 11AM 12PM 3PM 5PM 6PM
Thank you for any guidance.
Solved! Go to Solution.
Hi @Anonymous ,
When using Format() function, it converts a value to text according to the specified format, refer: Format()
Try to change the data type from text to time and it may sort by time normally as your expected.
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
When using Format() function, it converts a value to text according to the specified format, refer: Format()
Try to change the data type from text to time and it may sort by time normally as your expected.
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
When you use FORMAT you change it to a text value so it sorts alphabetically.
I would recommend military time hours and use the technique for display found here: https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/td-p/793639
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.