Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.