Hey there!
I'm having trouble selecting cases from a table, that match a calculated condition.
The data I'm trying to analyse is about quality-checks. A quality-check consists of multiple rows in which the result (minor fault/major fault/no fault/not relevant) of each checkpoint is delivered. My goal is to calculate the quality of each quality-check and display those quality-checks which didn't reach a certain percantage of quality.
What I already did is:
- Calculate the quality of each check in %
- 1- (SUM(STR_TO_INT(REMAP_VALUES("CASE_QS"."RESULT", ['no fault', '0'], ['minor fault', '5'], ['major fault', '10'], ['not relevant', '0']))) / (COUNT("CASE_QS"."CHECKPOINT")*10))
- Create condition to evaluate whether the desired quality of 99,9% isn't reached
- CASE WHEN (1- (SUM(STR_TO_INT(REMAP_VALUES("CASE_QS"."RESULT", ['1', '0'], ['2', '5'], ['3', '10'], ['4', '0']))) / (COUNT("CASE_QS"."CHECKPOINT")*10))) < .999 THEN 'YES' ELSE 'NO' END
- Create OLAP-table with
- <99.9% YES/NO
- Count (Distinct "CASE_QS"."CHECK")
- Date
As shown in the picture, the OLAP-table always shows all the checks, not only those under 99.9%. How could I achieve that?
Thank you very much in advance, I hope somebody can give me a hint :).