Forum Discussion

Jacekk111's avatar
Jacekk111
Helper I
3 years ago
Solved

Measure with summarize needs extra bounding

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 visu...
  • rubayatyasmin's avatar
    3 years ago

    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:

    1. Create a calculated column to calculate the proportion of time lost due to breakdowns during each shift.

    2. Create a measure to calculate the reduction in human resources for each row (shift) based on the calculated proportion from step 1.

    3. 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]
    )