Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi everyone,
I am trying to plot a time series over 24 hours in a day. My x-axis data looks like this:
0-1 stands for the counts in 00:00-01:00 and 23-24 stands for 23:00-24:00.
To make sure that the x axis is in the time order insteand of text order, I currently have two ideas:
1. create a new column to and manually input corresponding rank and sort my "time range" by that new column. But this means repeated work which I tend to avoid.
2. change the data type of "time range" to some supported time-related data type like "Duration". How to achieve this though?
Thank you for all your help!
I solved the problem by replacing 1-2 with 01-02 and 3-4 with 03-04 etc.
Still would like to know how to do it by taking advantage of the supported data type. So welcome to share!
Why would the first option need repeated work? If you have a related table with time_range and time_range_sort, then that table should be absolutely static within your data model.
Hi @Greg_Deckler,
So
1. when creating the time range order, don't I have to manually input 1-24 correspondingly?
2. the idea of using releted table sounds good. But I don't know how to do that. Can you elaborate it?
Thanks
Could we consider to omit the “-” here?
Or consider replace the “- ” with a special number like “0” ?
There is no available data types that would make the time range here (with the “-” inside numbers) to format as number type.
Also as you already suggested, create another column to give a manually rank seems to be a more suitable way.
Regards,
Charlie Liao
Yes, you would have to enter it one time manually. Easiest way to do this is to use Enter Data and just put in your time_range column and your time_range_sort column manually. Close that and set your "Sort By". Then use the Relationships pane (3rd icon down on the left-hand side in Desktop) and drag time_range column from one table to your new "lookup" table. Then, use the time_range column from your new "lookup" table in your visuals.