For more information, please refer to this announcement explaining best practices for getting answers to questions.
Calculations based on multiple historical statuses for the same application
Summary
Is there a better way to write this?Content
The below formula works individually but when combined with the rest of the Analysis it just spins. Ideally I would like to use a FILTER formula but was unable to craft an expression that worked. As this is one of multiple calculations more creative filtering wasn't pursued as to not impact the other calculations.
The goal is to yield a percentage of applicants that have historical statuses of both 'Internal Meets Minimum Qualifications' AND 'HR Interview' divided by the total number of applicants with 'HR Interview'.
IFNULL(CAST((COUNT(DISTINCT CASE WHEN MIN(CASE WHEN "Submission CSW Status - Historical"."Historical Status Name" = 'HR Interview' THEN "Submission CSW Status - Historical"."Historical Status Name" END BY "Submission General Info"."Submission Identifier") = 'HR Interview' AND MIN(CASE WHEN "Submission CSW Status - Historical"."Historical Status Name" = 'Internal Meets Minimum Qualifications' THEN "Submission CSW Status - Historical"."Historical Status Name" END BY "Submission General Info"."Submission Identifier") = 'Internal Meets Minimum Qualifications' THEN "Submission General Info"."Submission Identifier" END BY "Requisition Identification"."Req. Identifier")/COUNT(DISTINCT CASE WHEN "Submission CSW Status - Historical"."Historical Status Name" = 'HR Interview' THEN "Submission General Info"."Submission Identifier" END))*100 AS DOUBLE),0)