Needing for a formula to COUNT each of 3 values from grouped column and display in GF. Values are 0,1,2 from a results column that is grouped by a session id (mySQL). Have tried formulas and running totals in various ways. With the following code I can return a total value of all fields but have not returned only 0, only 1, or only 2 to field.
Created variables:
If {table_testcase_execution1.testcase_execution_result}=2 Then "Fail"
Else If {table_testcase_execution1.testcase_execution_result}=1 Then "Pass"
Else If {table_testcase_execution1.testcase_execution_result}=0 Then "Not Tested"
Applied 3 formulas (to place formula fields in same row in report) 1 example as follows:
If ({table_testcase_execution1.testcase_execution_result}=1)
Then Count (
{@AllBaseCount}, {table_testcase_execution1.campaign_session_id})
Sampling of my RTotal effort:
Name...
Field: .result
Type: sum
Evaluate w/ Use a formula: {table_testcase_execution1.testcase_execution_result}= 1
Reset w/ On change of group: .session_id
Results from both efforts, however, are sum count of all values. Need a loop or iteration statement added to specify value (0 or 1 or 2) COUNT returned.
Please offer solution.