Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I'd like to a measure calculation so that if its the 6am and 10pm shift, the goal is # of people working X 7.5, if it's the 10am, 2pm, and 6pm block, the goal is number of people working X 10, all other hours are # of people working X 15. See below example and expected result for the goal.
| # Produced | # of People Working | Hour | Goal |
| 5 | 4 | 6am | 30 |
| 7 | 10 | 7am | 150 |
| 9 | 9 | 8am | 135 |
| 8 | 6 | 9am | 90 |
| 20 | 4 | 10am | 40 |
| 34 | 4 | 11am | 60 |
| 60 | 4 | 12pm | 60 |
| 60 | 4 | 1pm | 60 |
| 78 | 4 | 2pm | 40 |
| 90 | 6 | 3pm | 90 |
| 88 | 5 | 4pm | 75 |
| 87 | 4 | 5pm | 60 |
| 66 | 6 | 6pm | 60 |
| 24 | 4 | 7pm | 60 |
| 55 | 6 | 8pm | 90 |
| 66 | 7 | 9pm | 105 |
| 7 | 5 | 10pm | 37.5 |
Solved! Go to Solution.
Create a new Calculated Column using the SWITCH function:
Goal2 = SWITCH(
TRUE(),
OR( [Hour] = Time(6,0,0), [Hour] = Time(22,0,0 )), [# of People Working]*7.5,
OR( [Hour] =Time(10,0,0), OR( [Hour] = Time(14,0,0), [Hour] = Time(18,0,0))), [# of People Working]*10,
[# of People Working]*15 )
Trust this is what you are looking for.
Regards,
Create a new Calculated Column using the SWITCH function:
Goal2 = SWITCH(
TRUE(),
OR( [Hour] = Time(6,0,0), [Hour] = Time(22,0,0 )), [# of People Working]*7.5,
OR( [Hour] =Time(10,0,0), OR( [Hour] = Time(14,0,0), [Hour] = Time(18,0,0))), [# of People Working]*10,
[# of People Working]*15 )
Trust this is what you are looking for.
Regards,
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |