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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Saqibmughal00
Frequent Visitor

I want to create a measure with 2 conditions based on days

Hi Experts,

 

I am required to create a measure for calculating number of people from hours spent. the challenge is every day is 10.5 hours except friday which is 7.6 hours. How do I specify that in my measure?

 

My current measure is straight forward

 

No Of Labor = SUM(Database[HoursWorked]) / VALUE(10.5)
 
Any Help would be appreciated and thanks in advance.
5 REPLIES 5
Saqibmughal00
Frequent Visitor

This worked but reduced my other days numbers.

My Equation:

Saqibmughal00_0-1722411428307.png

 

the equation you provided:

Saqibmughal00_1-1722411481259.png

 

No Of Labor = SUM(Database[HoursWorked]) / (VALUE(10.5)-IF(WEEKDAY(MAX(Database[Work Date]),2)=5,2.9,0))

wdx223_Daniel
Super User
Super User

No Of Labor = DIVIDE(SUM(Database[HoursWorked]) ,10.5-IF(WEEKDAY(MAX(Table[Date]),2)=5,2.9,0))

Saqibmughal00_0-1722403926067.png

Thanks but still not able to understand. This is how my table looks like, and how will I put 7.6 hrs condition then?

No Of Labor = SUMX(SUMMARIZE(Database,Database[HoursWorked],Database[Work Date),DIVIDE(Database[HoursWorked] ,10.5-IF(WEEKDAY(Database[Work Date],2)=5,2.9,0)))

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.