Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
109 | |
100 | |
39 | |
31 |
User | Count |
---|---|
154 | |
122 | |
77 | |
74 | |
44 |