Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Guys,
I need a help with a following:
For each PackageCode I need to find Delta Time (StateChangeTs) between Destination = DynamicTester_9_1_2_ModuleLocation and Destination=DynamicTester_9_1_2_OutputBuffer.
This code gives me an error:
Also how can I include a condition that specifically for the same PackageCode the formula shall do DateDiff, so in case if the same two PackageCode rows are not in the sequence, it can do correct calculation
Solved! Go to Solution.
@Anonymous - Probably easier if you break it down:
Cycle Time =
VAR __Table = FILTER('Dynamic Tester 9_1_1', [Destination]= "DynamicTest_9_1_2_ModuleLocation" && [StateChangeTs] < EARLIER([StateChangeTs]))
VAR __Time1 = MAXX(__Table,[StateChangeTs])
VAR __Time2 = 'Dynamic Tester 9_1_1'[StateChangeTs]
RETURN
IF([Destination] = "DynamicTester_9_1_2_OutputBuffer",DATEDIFF(__Time1,__Time2,second),BLANK())
@Anonymous , Like this
Cycle Time = DATEDIFF(MAXX(FILTER('Dynamic Tester 9_1_1', [Destination]= EARLIER([Destination]) && [StateChangeTs] <EARLIER([StateChangeTs])),[StateChangeTs]), 'Dynamic Tester 9_1_1'[StateChangeTs],second)
Thanks for reply. Not sure that really works. Cause the Delta T does for the same Package Code does look correct. I would like specifically to put condition that for Time(1) the destination is DynamicTester_9_1_2_ModuleLocation and for Time(2) is DynamicTester_9_1_2_OutputBuffer
@Anonymous - Probably easier if you break it down:
Cycle Time =
VAR __Table = FILTER('Dynamic Tester 9_1_1', [Destination]= "DynamicTest_9_1_2_ModuleLocation" && [StateChangeTs] < EARLIER([StateChangeTs]))
VAR __Time1 = MAXX(__Table,[StateChangeTs])
VAR __Time2 = 'Dynamic Tester 9_1_1'[StateChangeTs]
RETURN
IF([Destination] = "DynamicTester_9_1_2_OutputBuffer",DATEDIFF(__Time1,__Time2,second),BLANK())
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.