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 moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello,
I am looking to determine the difference in hours on a given day for a salesman who works that day. The expected result would be essentially be a seperate table with the salesmans name, the date, and the difference between the hours worked in that day.
The table below is a sampling of the data but this would need to scale to around 1000 people. .
Agent CustomerName Date
| Billy | Random Customer | 10/27/18 6:21 AM |
| Billy | Random Customer | 11/4/18 7:26 AM |
| Billy | Random Customer | 10/9/18 04:13:AM |
| Billy | Random Customer | 10/9/18 05:43:AM |
| Billy | Random Customer | 10/9/18 03:33:AM |
| Billy | Random Customer | 10/9/18 01:13:AM |
| Bob | Random Customer | 10/27/18 12:27 AM |
| Bob | Random Customer | 10/27/18 2:02 AM |
| Bob | Random Customer | 10/27/18 4:26 AM |
| Bob | Random Customer | 10/27/18 7:26 AM |
| Bob | Random Customer | 10/27/18 7:26 PM |
| Bob | Random Customer | 10/27/18 10:26 PM |
| Bob | Random Customer | 10/11/18 7:16 AM |
| Bob | Random Customer | 10/11/18 2:16:03PM |
| Bob | Random Customer | 10/11/18 07:16:03PM |
| Bob | Random Customer | 10/11/18 1:36:03PM |
| Bob | Random Customer | 10/11/18 1:21:03PM |
| Bob | Random Customer | 11/1/18 1:16 PM |
Any help you can provide would be greatly appreciated.
Thank you
Solved! Go to Solution.
HI @demonfc,
In my opinion, I'd like to suggest you extract hour part from datetime column. Then you can create time table with time value from 0:00 to 23:00, build relationship from time table to new 'hour' column.
Column formula:
Hour = TIME(HOUR([Date]),0,0)
Calculate table formula:
Time table = GENERATESERIES(TIME(0,0,0),TIME(23,0,0),TIME(1,0,0))
After these steps, you can use time table column as axis, origin table column as value column create visuals with summarize original table values.
Regards,
Xiaoxin Sheng
HI @demonfc,
In my opinion, I'd like to suggest you extract hour part from datetime column. Then you can create time table with time value from 0:00 to 23:00, build relationship from time table to new 'hour' column.
Column formula:
Hour = TIME(HOUR([Date]),0,0)
Calculate table formula:
Time table = GENERATESERIES(TIME(0,0,0),TIME(23,0,0),TIME(1,0,0))
After these steps, you can use time table column as axis, origin table column as value column create visuals with summarize original table values.
Regards,
Xiaoxin Sheng
Hello @demonfc
In order to determine the difference in hours you must have a start datetime and a end datetime.
In you date what is your start datetime and what is your end datetime???
Hi sokg,
Basically, it would be a 24 hour date/time of any given day. Starting at 12:00:00 AM of any given day and ending at 11:59:59 PM that same day.
Thank you for your help.
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 |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 30 | |
| 23 |