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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Saqibmughal00
Helper I
Helper I

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
Helper I
Helper I

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.