Skip to main content

Sum(CASE WHEN "ActivityTable"."Activity" = 'something'

THEN 1.0 ELSE NULL END) gives me the count when there is an entry "something" in the table.

My challange is following:

I need to count Distinct Case_ID, whenever "something" happens. It can happen more than 1 time for an Case_ID, so i need a PQL statement like:

CASE WHEN "ActivityTable"."Activity" = 'something'

THEN count (Distinct(Case_ID) ELSE NULL END, which is ofcourse not working like this.

Ideas and solutions are welcome. Thanks a lot

Not sure if it is the same but:

 

COUNT(DISTINCT

CASE WHEN PROCESS EQUALS activity THEN _CASE_KEY

ELSE NULL

END

)

 

works for some similar situations.

 

HTH


Works like a charm...thanks a lot😀


Reply