Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi there,
I am creating a report using Line Chart where I want to show count based on hours.
Can anyone help me to sort out the time in a proper order.
I want it to be like 7 AM, 8AM, 9 AM,10 AM, etc.
Solved! Go to Solution.
Hello @Anonymous ,
Follow below steps to achieve this.
1. In Power Query create two columns. one for time and other for hour (hour column is created from the time column)
2. Make sure the hour column data is from 1-24 instead of AM-PM
3. Once data is loaded to Power BI Desktop, select the time column and sort it using hour column under the option sort by column
4. Use this time column in the visual then it will sort in proper order.
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
Hello @Anonymous ,
Follow below steps to achieve this.
1. In Power Query create two columns. one for time and other for hour (hour column is created from the time column)
2. Make sure the hour column data is from 1-24 instead of AM-PM
3. Once data is loaded to Power BI Desktop, select the time column and sort it using hour column under the option sort by column
4. Use this time column in the visual then it will sort in proper order.
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
@Anonymous can you share a sample dataset that you are using (after removing sensitive information)
Hi @AbbasG,
you can consider this as sample data
| Time | Logged Hours |
| 7 AM | 6 |
| 8 AM | 7 |
| 9 AM | 8 |
| 10 AM | 4 |
| 11 AM | 3 |
| 12 PM | 8 |
| 1 PM | 2 |
| 2 PM | 4 |
Check out the April 2026 Power BI update to learn about new features.
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.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 69 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |