Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi
I need to breakdown the start and finish times of our staff into hours so i can compare hourly sales vs hourly staff costs. I have got to a point where i have the hour breakdown from the signing in and signing out times, but cant work out how to add the breaks (there are up to 4 a day for some lucky staff) I think the original formula i have used is very long winded and can probably be simplified as well, but as a novice i went with what i could do!!
Formula used is;
The break data looks like this;
Would ideally like to have just the one column with all the information calculated.
Hi @wailey1 ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create calculated columns.
breakhour = HOUR([Break1Length]+[Break2Length]+[Break3Length]+[Break4Length])workhour- breakhour =
var _work = HOUR([SignedOutTime]-[SignedInTime])
var _break=CALCULATE(SUM('Table (2)'[breakhour]),FILTER('Table (2)',[id]=EARLIER('Table'[id])))
return _work-_break
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi
Thanks for your response but that wasnt what i was after. I have done a pbix of my raw data, but i cant work out how to attach it to this reply!! Apologies for my ignorance, but can you show me how, then i can explain what i need.
Thanks
Hi @wailey1 ,
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Neeko Tang
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 |
|---|---|
| 53 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 39 | |
| 35 | |
| 23 |