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
Nicole_
Regular Visitor

Sum values if day name is "Monday", "Tuesday"...

Hello,

 

I am trying to develop a measure that calculates available work hours per day, but accounts for part time employees and also public holidays. Full time employees are easy as standard hours per day = 8, or 0 if there is a public holiday on that day.

 

However I want to be able to have if the day name = Monday, then sum the relevant values for each resource. The main reason it needs to be broken up like this is if a public holiday falls on a day an individual doesnt work, then they dont get reduced hours. I have a standard calendar_lookup which has dates and related info (day name, day number, start of week, month, year etc) as per the below:

Nicole__0-1669959329308.png

My data is set out similar to the below:

ResourceMondayTuesdayWednesdayThursdayFriday
A08880
B7.5507.55
C80880
All others88888

I have tried unpivoting the data but either way I cant seem to get these to talk. Any help would be appreicated!

Thanks in advance!

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @Nicole_ ,

 

According to your description, the public holiday you are referring to is to be excluded, does it come from a separate date list?


Looking forward to your reply.


Best Regards,
Henry

 

Yes, it is in a separate date list that is connected to the calendar lookup and includes date, day name and PH name.

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.