For more information, please refer to this announcement explaining best practices for getting answers to questions.
Averaging another field if the primary field is null
Summary
Bucketing resultsContent
Hello,
I am averaging Requisition aging in days, below are the date fields that we I am using:
"Requisition Dates"."First Sourced Date" or "Requisition Dates"."First Fully Approved Date" (I am averaging this field only if the first sourced date is null)
I have the following formula and it is working
CASE WHEN "Requisition Dates"."First Sourced Date" IS NULL THEN (Avg(TIMESTAMPDIFF(SQL_TSI_DAY, "Requisition Dates"."First Fully Approved Date", CURRENT_TIMESTAMP))) ELSE (Avg(TIMESTAMPDIFF(SQL_TSI_DAY, "Requisition Dates"."First Sourced Date", CURRENT_TIMESTAMP))) END
However ..... I need to then bucket the results that I get from that formula. For example # of Reqs Open 0-30 Days , # of Reqs Open 30-60 Days , etc... all of this accounting for the field that might be blank.