Please send help! I’m desperatly trying to count all cases with “repair in time” = 1 (true)
If not repaired in time there’s 0. SUM doesn’t work, because there is more than one activity per case, so there are many rows matching the same case id in the data base.
I’m looking for the percentage of cases repaired in time (of total cases) carried out by one service point.
AVG( CASE WHEN "EventLog_UPLOAD_csv"."REPAIR_IN_TIME" = 1 THEN 1.0 ELSE 0.0 END)
Unfurtonately, it counts rows, not cases. So the result isn’t exact.
Can someone help?