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.
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,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
79 | |
74 | |
56 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |