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
OCBB_SFAFPandA
Resolver I
Resolver I

How do you calculate the weekly hours for each employee?

Hello,

 

I have a table that summarized hours by employee daily by

 

Total hours | Reg hrs | OT hrs | DblOT

How would I agreggate on a weekly level? and build in a calculation that if Total hours >40 in a week, any hour over is marked as OH hrs?

3 REPLIES 3
v-yetao1-msft
Community Support
Community Support

Hi @OCBB_SFAFPandA 

Create a calculated column or a measure depends on your requirements for data presentation . In the case of row context, calculated column can be used. If it is an aggregate operation, it is recommended to use measure. Of course, if you can provide specific data and needs, we can better help you solve the problem.

 

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

vapid128
Solution Specialist
Solution Specialist

add colnum 

weekNumIndex = int(([date]-2)/7)
summarize again by employee and weekNumIndex and sum hrs

thanks for the reply! 

 

To summarize again, would these be new measures or more new columns? The end visual won't be showing emp IDs, just the location and hrs/cost on a weekly.

 

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.

Top Solution Authors