Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
knightkblack
Frequent Visitor

Sorting Time of Day on Chart

I have employees at the company who work as recruiters and so we track their talk time (the amount of time they are on the phone) throughout the day. I am trying to create a graph where we will be able to easily see how many minutes of talktime they had each hour during the day. For example, between 8 and 9 oclock, they had 40 minutes of talktime, 9 and 10 oclock they had 37 minutes and so on. The issue I'm running into is sorting the graph in chronological order so that the beginning of the day comes first and the end of the day comes last. Does anybody have any suggestions? I've copied a picture of the graph below.

 

The "hours" on the bottom are formatted as text because they have the AM/PM attached to it. I feel like that is easiest for the end user to quickly see which hours are which, but also realize that it might not be possible to sort properly with that format. 

 

 

Talktime Graph.PNG

1 ACCEPTED SOLUTION
v-danhe-msft
Employee
Employee

Hi @knightkblack,

Based on my test, you can refer to below steps:

1.You can create a table like following one and create relationship with the original table.

2.PNG

3.PNG

 

2.Create a calculated column in original table with following formula.

New = RELATED(Sheet2[Order])

4.PNG

3.Select the Type column and make it sorted by above created column.

5.PNG

4.Create a Clustered column chart and add the [Hours] and [Minute] fields. And sort by the “Sort by Hours”. Now you can see the result.

6.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/6fnqplx7v8p2yav/Sorting%20Time%20of%20Day%20on%20Chart.pbix?dl=0

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-danhe-msft
Employee
Employee

Hi @knightkblack,

Based on my test, you can refer to below steps:

1.You can create a table like following one and create relationship with the original table.

2.PNG

3.PNG

 

2.Create a calculated column in original table with following formula.

New = RELATED(Sheet2[Order])

4.PNG

3.Select the Type column and make it sorted by above created column.

5.PNG

4.Create a Clustered column chart and add the [Hours] and [Minute] fields. And sort by the “Sort by Hours”. Now you can see the result.

6.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/6fnqplx7v8p2yav/Sorting%20Time%20of%20Day%20on%20Chart.pbix?dl=0

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.