Calculate test case pass-rate of different time periods

I have a dataset which has the following data:
testcase name - (string) the name of test cases
date - (date) the date when the test case has been run
status - (string) ‘PASS’ or ‘FAIL’
i want to show the visual of the test case pass rate, like

testcase name last year’s pass rate last quarter’s pass rate last month’s pass rate last day’s pass rate
test1 46% 47% 45% 33%
test2 60% 60% 60% 60%
test3 93% 90% 98% 95%
TOTAL 70% 71% 72% 73%

i tried several ways but always get : Mismatched aggregation. Custom aggregations can’t contain both aggregate “COUNT” and non-aggregated fields… in any combination. and the main problem is i think i’m not in the right direction

Can anyone help me to build it please?
Thanks in advance!
Yujuan Liu

Can you show us your calculated field?

Also can you explain how your data is formatted in the dataset and how you get the above table?

Hi @Max thank you very much for reply.
here is my dataset and calculated field for last year pass rate as the example, i really think i’m in the wrong direction even

Thanks again!!
Yujuan Liu

Hello @yujuanliu , Please follow the below snapshot, where I have tried to replicate your scenario and resolve the same. You just need to manipulate the calculation a bit to achieve the required timeframes for your calculations. Hope this helps!

Did my suggestion help you in resolving your query? If yes, would request you to mark the post as “Solution”. This will help the community to find guidance and answers to similar question. Thank you!


hi @sagmukhe this works perfectly for me!!!
i’m really thankful for your help, this stuck me for 2 days

1 Like