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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Need help with some measures

Hello,

 

I need your help with a measure and have added some sample data below. 

I want to calculate throughput time for each pallet, each pallet has 4 stages (palletstatuscodelog(1)) they are:

 

Magazijn: The time where a pallet has been registered at inbound

Palletvraag: The time the operator has selected a pallet for production

Opgezet: The time where a pallet has been taken for production by an employee

Afgemeld: End time where the pallet has been competely used

 

Now for each PalletID i want 1 column for each of the stages with the PalletStatusTijdstipLog (1)

 

So basically I need 4 measures like below:

 

52958  TimeMagazijn  TimePalletvraag  TimeOpgezet  TimeAfgemeld

 

Your help is much appreciated.

 

 

tempsnip.png

 

 

PalletID PalletStatusCodeLog (1) OogstDatum PalletStatusTijdstipLog (1)
52958 Afgemeld 12-10-2018 0:00:00 15-10-2018 7:40:13
52958 Magazijn 12-10-2018 0:00:00 15-10-2018 7:04:03
52958 Opgezet 12-10-2018 0:00:00 15-10-2018 7:07:17
52958 Palletvraag 12-10-2018 0:00:00 15-10-2018 7:04:03
52959 Afgemeld 12-10-2018 0:00:00 15-10-2018 8:03:18
52959 Magazijn 12-10-2018 0:00:00 15-10-2018 7:04:03
52959 Opgezet 12-10-2018 0:00:00 15-10-2018 7:16:19
52959 Palletvraag 12-10-2018 0:00:00 15-10-2018 7:13:59
52960 Afgemeld 12-10-2018 0:00:00 15-10-2018 8:27:03
52960 Magazijn 12-10-2018 0:00:00 15-10-2018 7:04:03
52960 Opgezet 12-10-2018 0:00:00 15-10-2018 7:35:45
52960 Palletvraag 12-10-2018 0:00:00 15-10-2018 7:31:39

1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@Anonymous I guess you are looking for...

 

Test29Out1 = CALCULATE(MAX(Test29[PalletStatusTijdstipLog]),Test29[PalletStatusCodeLog]= "Magazijn")

Test29Out2 = CALCULATE(MAX(Test29[PalletStatusTijdstipLog]),Test29[PalletStatusCodeLog]= "Palletvraag")

Test29Out3 = CALCULATE(MAX(Test29[PalletStatusTijdstipLog]),Test29[PalletStatusCodeLog]= "Opgezet")

Test29Out4 = CALCULATE(MAX(Test29[PalletStatusTijdstipLog]),Test29[PalletStatusCodeLog]= "Afgemeld")

image.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




View solution in original post

3 REPLIES 3
PattemManohar
Community Champion
Community Champion

@Anonymous I guess you are looking for...

 

Test29Out1 = CALCULATE(MAX(Test29[PalletStatusTijdstipLog]),Test29[PalletStatusCodeLog]= "Magazijn")

Test29Out2 = CALCULATE(MAX(Test29[PalletStatusTijdstipLog]),Test29[PalletStatusCodeLog]= "Palletvraag")

Test29Out3 = CALCULATE(MAX(Test29[PalletStatusTijdstipLog]),Test29[PalletStatusCodeLog]= "Opgezet")

Test29Out4 = CALCULATE(MAX(Test29[PalletStatusTijdstipLog]),Test29[PalletStatusCodeLog]= "Afgemeld")

image.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Anonymous
Not applicable

Amazing thanks!

AkhilAshok
Solution Sage
Solution Sage

Something like this might help:

Throughput Time (Min) = 
DATEDIFF (
    MIN ( Table1[(1) OogstDatum] ),
    MIN ( Table1[PalletStatusTijdstipLog (1)] ),
    MINUTE
)

TimeMagazijn = 
CALCULATE (
    SUMX ( VALUES ( Table1[PalletID] ), [Throughput Time (Min)] ),
    Table1[PalletStatusCodeLog] = "Magazijn"
)

You can continue like this for other measures...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.