Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hello! I am working on a project, and I need my time to be in standard time (not military time). I think I got this coded, but when I go to sort my graph, it doesn't sort by 1am - 11pm.... Attached is my code and screenshots of my data.
Thanks in advance!
Solved! Go to Solution.
@Anonymous Instead of making it text, you can make it a time format pushed to the hour, then format it how you please, and it will then sort appropriately.
TIME function (DAX) - DAX | Microsoft Docs
Time_Hour = TIME(hour([Time]),0,0)
Then in the ribbon or in the modeling tab (in modelling you can do custom formats!) you can pick the format you want it to display as.
You can get the X-Axis to show each by changing it to "Categorical" too:
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
Hi @Anonymous
Try this
Hour_Real =
VAR aux_ = 1/24
RETURN
aux_*HOUR(Table1[Time])
converting the calculated column to type Time
|
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
@Anonymous Instead of making it text, you can make it a time format pushed to the hour, then format it how you please, and it will then sort appropriately.
TIME function (DAX) - DAX | Microsoft Docs
Time_Hour = TIME(hour([Time]),0,0)
Then in the ribbon or in the modeling tab (in modelling you can do custom formats!) you can pick the format you want it to display as.
You can get the X-Axis to show each by changing it to "Categorical" too:
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 62 | |
| 58 | |
| 45 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 121 | |
| 116 | |
| 37 | |
| 34 | |
| 30 |