Skip to main content
Question

Calculate cycle time using case when for certain condition

  • May 13, 2024
  • 1 reply
  • 17 views

bennita.dutoi12
Level 7
Forum|alt.badge.img+6

Hi, What could be wrong here. I want to calculate the Cycle time for the Manual channel (note: all is variables as its for an App) the Manual channels consist of a couple of inputs (e.g. manual channel 1, Manual channel 2 etc. but all chosen in a dropdown writing to variable called Manual_channels)

My error message is:

image 

${{agg}} (Case when ${{Payment_Channel}} = ${{Manual_Channels}} Then(

  CALC_THROUGHPUT (

    ALL_OCCURRENCE [ 'Process Start' ]

    TO

    ALL_OCCURRENCE [ 'Process End' ] ,

    REMAP_TIMESTAMPS (

      TIMESTAMP_COLUMN ( ${{activity_table_case_centric}} ) ,

      ${{main_time_scale}} ,

      WEEKDAY_CALENDAR ( ${{monday_check}} ${{tuesday_check}} ${{WEDNESDAY_check}} ${{THURSDAY_check}} ${{FRIDAY_check}} ${{SATURDAY_check}} ${{SUNDAY_check}})

    )

  )

))

 

 

1 reply

dennis.pflug
Level 10
  • Level 10
  • 182 replies
  • May 15, 2024

Hi Bennita,

 

it looks like you are not closing your CASE WHEN statement.

I am missing an END in your logic.

Not sure if this is the only issue. If not I would recommend to first try to make the logic running with hard coded values instead of using the variables and after that you can step by step go back to use the variables but first try to close the CASE WHEN statement.

 

BR

Dennis