Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register 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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |