This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 37 | |
| 32 | |
| 27 | |
| 24 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 50 | |
| 31 | |
| 26 | |
| 22 |