Please help me

I am using the below calculation to find the employee who is having 3 or more than 3 PR. once I have this data then I want to total the count

COUNT(CASE WHEN Attendance Check = 'Present 3 or More Days' THEN 1 ELSE 0 END)

on the above calculation, i tried with the SUM function as well but it is still same. It is passing the Beastmode but when i am putting this into a table it won't work.

CASE
WHEN SUM(CASE WHEN Status = 'PR' THEN 1 ELSE 0 END) >= 3 THEN 'Present 3 or More Days'
ELSE 'Less Than 3 Days'
END

(I want a calculation which can check, if the employee is present or not (PR) for 3 or more than 3 in a week. Once I get this, then I want a count of all it who are present for 3 or more than 3 in a week) If there is any way then please help me

Tagged:

Answers

  • @M_A Can you please share an example of the result you are receiving and the desired result so we can understand what specifically isn't working?

  • M_A
    M_A Member

    so after this calculation "CASE
    WHEN SUM(CASE WHEN Status = 'PR' THEN 1 ELSE 0 END) >= 3 THEN 'Present 3 or More Days'
    ELSE 'Less Than 3 Days'
    END"

    The above calculation saved as "Attendance Check"

    I am getting 'Present 3 or More Days' and 'Less Than 3 Days' and after that, when i am trying to sum the count who is present 3 or more days three, it won't come. for this i am using, "COUNT(CASE WHEN Attendance Check = 'Present 3 or More Days' THEN 1 ELSE 0 END)"

    The above calculation is saved as "Final Check". when i put "Final Check" in a column (Mega Table or any other table), it shows like this "An issue has occurred during processing. We are unable to complete the request at this time."