The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Community,
I have problem with achive correct result in my measure.
I have this type of relations in my table. This is bouding by Date+Shift time (6:00, 14:00 and 22:00).
In visualisation, I apply the filter per day. What I have to do in my measure is reduce the sum of human resources by the time of breakdown during the shift. For example, breakdown tooks 60 minutes and the time of total shift is 480 minutes, so I need to do math (60/480) x 11 people. In my cause I should get 9 hours but, for some reason the output is 26 hours.
Why 26h? Because it is summing for all 3 shifts (1 shift: 11 people, 2 shift 11 people, 3 shift: 9 people).
In correct way it should take only 1 shift.
Basically, I used summarize and it should do math for each shift on daily basises and make 0 where there is nothing bacuse of multiplier and don't know why get 26h instead of 9h.
Do You have idea for this measure?
JP
Solved! Go to Solution.
Hi there,
Based on your description and the provided images, it seems like you want to calculate the total reduction in human resources due to breakdowns during each shift and then summarize it on a daily basis. To achieve this, you can follow these steps:
Create a calculated column to calculate the proportion of time lost due to breakdowns during each shift.
Create a measure to calculate the reduction in human resources for each row (shift) based on the calculated proportion from step 1.
Summarize the measure on a daily basis to get the final result.
Here's how you can do it:
Step 1: Create a calculated column to calculate the proportion of time lost due to breakdowns during each shift:
ShiftDuration = 480
ShiftBreakdownProportion = DIVIDE(SUM(cr6af_wyjatki[Czas]), [ShiftDuration])
Step 2: Create a measure to calculate the reduction in human resources for each row (shift) based on the calculated proportion from step 1:
ReductionInHumanResources = SUM(cr6af_daneobecnosc[Czas]) * [ShiftBreakdownProportion]
Step 3: Summarize the measure on a daily basis to get the final result:
TotalReductionInHumanResources =
SUMX(
VALUES(cr6af_daneobecnosc[Data Zmiana]),
[ReductionInHumanResources]
)
Proud to be a Super User!
Hi there,
Based on your description and the provided images, it seems like you want to calculate the total reduction in human resources due to breakdowns during each shift and then summarize it on a daily basis. To achieve this, you can follow these steps:
Create a calculated column to calculate the proportion of time lost due to breakdowns during each shift.
Create a measure to calculate the reduction in human resources for each row (shift) based on the calculated proportion from step 1.
Summarize the measure on a daily basis to get the final result.
Here's how you can do it:
Step 1: Create a calculated column to calculate the proportion of time lost due to breakdowns during each shift:
ShiftDuration = 480
ShiftBreakdownProportion = DIVIDE(SUM(cr6af_wyjatki[Czas]), [ShiftDuration])
Step 2: Create a measure to calculate the reduction in human resources for each row (shift) based on the calculated proportion from step 1:
ReductionInHumanResources = SUM(cr6af_daneobecnosc[Czas]) * [ShiftBreakdownProportion]
Step 3: Summarize the measure on a daily basis to get the final result:
TotalReductionInHumanResources =
SUMX(
VALUES(cr6af_daneobecnosc[Data Zmiana]),
[ReductionInHumanResources]
)
Proud to be a Super User!
User | Count |
---|---|
79 | |
73 | |
39 | |
30 | |
28 |
User | Count |
---|---|
108 | |
99 | |
55 | |
49 | |
45 |