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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Jacekk111
Helper I
Helper I

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

 

Jacekk111_1-1690453374204.png

 

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. 

3_3 wyjatki = SUMMARIZE( VALUES(cr6af_daneobecnosc[Data Zmiana]) ,"Total",CALCULATE(SUM(cr6af_daneobecnosc[Czas])*SUM(cr6af_wyjatki[Czas])/480))

 

Jacekk111_2-1690453792641.png

 

Do You have idea for this measure?

JP

1 ACCEPTED SOLUTION
rubayatyasmin
Community Champion
Community Champion

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

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


View solution in original post

1 REPLY 1
rubayatyasmin
Community Champion
Community Champion

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

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.