Skip to main content
Solved

Time interval between 2 activities

  • May 7, 2024
  • 4 replies
  • 80 views

steven.bernd
Level 6
Forum|alt.badge.img+1

Hello everyone, I am currently calculating the time interval between 2 activities for my department, see formula...

 

TRIMMED_MEAN(CALC_THROUGHPUT(FIRST_OCCURRENCE['toPAS: QT5.2 - Check successful'] TO FIRST_OCCURRENCE['XI release'], REMAP_TIMESTAMPS("T_CEL_AT_HP5"."EVENTTIME", DAYS, MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY)), 5, 5)

 

Now it can and may also be the case that the activities are swapped, how can I then incorporate this option into the formula?

 

TRIMMED_MEAN(CALC_THROUGHPUT(FIRST_OCCURRENCE['toPAS: QT5.2 - Check successful'] TO FIRST_OCCURRENCE['XI release'], REMAP_TIMESTAMPS("T_CEL_AT_HP5"."EVENTTIME", DAYS, MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY)), 5, 5)

OR

TRIMMED_MEAN(CALC_THROUGHPUT(FIRST_OCCURRENCE['XI release'] TO FIRST_OCCURRENCE['toPAS: QT5.2 - check successful'], REMAP_TIMESTAMPS("T_CEL_AT_HP5"."EVENTTIME", DAYS, MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY)), 5, 5)

 

This formula clarifies what I want, but it doesn't work.

 

Maybe someone can help me.

Thanks

Best answer by dennis.pflug

Ok got it.

 

I think it should work like this:

 

TRIMMED_MEAN(CASE WHEN PU_FIRST("CASE_TABLE","T_CEL_AT_HP5"."EVENTTIME", "T_CEL_AT_HP5"."EVENTTIME"."ACTIVITY_EN" = 'toPAS: QT5.2 - Check successful') < PU_FIRST("CASE_TABLE","T_CEL_AT_HP5"."EVENTTIME", "T_CEL_AT_HP5"."ACTIVITY_EN" = 'XI release') THEN

(CALC_THROUGHPUT(FIRST_OCCURRENCE['toPAS: QT5.2 - Check successful'] TO FIRST_OCCURRENCE['XI release'], REMAP_TIMESTAMPS("T_CEL_AT_HP5"."EVENTTIME", DAYS, MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY)))

ELSE

(CALC_THROUGHPUT(FIRST_OCCURRENCE['XI released'] TO FIRST_OCCURRENCE['toPAS: QT5.2 - Check successful'], REMAP_TIMESTAMPS("T_CEL_AT_HP5"."EVENTTIME", DAYS, MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY)))

END,5,5)

 

BR

Dennis

4 replies

dennis.pflug
Level 10
Forum|alt.badge.img+7

Hi Steven,

 

who and how will it be decided to swap the activitiesis?

Why are you not using two different components? One showing the time interval from toPAS: QT5.2 - Check successful to XI release and the other one from XI release to toPAS: QT5.2 - Check successul?

 

BR

Dennis

 


steven.bernd
Level 6
Forum|alt.badge.img+1
  • Author
  • Level 6
  • May 8, 2024

Thanks for your answer, the order of the activities actually doesn't matter, it's important that the time gap between the two activities doesn't become too large. I didn't want to have 2 KPIs displayed, depending on which activity occurs first. I would like to have this either or test integrated into a KPI.

 

Steven


dennis.pflug
Level 10
Forum|alt.badge.img+7
  • Level 10
  • Answer
  • May 8, 2024

Ok got it.

 

I think it should work like this:

 

TRIMMED_MEAN(CASE WHEN PU_FIRST("CASE_TABLE","T_CEL_AT_HP5"."EVENTTIME", "T_CEL_AT_HP5"."EVENTTIME"."ACTIVITY_EN" = 'toPAS: QT5.2 - Check successful') < PU_FIRST("CASE_TABLE","T_CEL_AT_HP5"."EVENTTIME", "T_CEL_AT_HP5"."ACTIVITY_EN" = 'XI release') THEN

(CALC_THROUGHPUT(FIRST_OCCURRENCE['toPAS: QT5.2 - Check successful'] TO FIRST_OCCURRENCE['XI release'], REMAP_TIMESTAMPS("T_CEL_AT_HP5"."EVENTTIME", DAYS, MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY)))

ELSE

(CALC_THROUGHPUT(FIRST_OCCURRENCE['XI released'] TO FIRST_OCCURRENCE['toPAS: QT5.2 - Check successful'], REMAP_TIMESTAMPS("T_CEL_AT_HP5"."EVENTTIME", DAYS, MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY)))

END,5,5)

 

BR

Dennis


steven.bernd
Level 6
Forum|alt.badge.img+1
  • Author
  • Level 6
  • May 13, 2024

the formula works perfectly. Thank you for that