COUNT(DISTINCT CASE WHEN THEN)

I am not sure why this formula is working, it seems fairly straight forward but I am just becoming a regular SQL user and our company just adopted DOMO. Any ideas?

COUNT(DISTINCT CASE WHEN `Account.Status__c` LIKE 'Cancel%' THEN 'Canceled')

Best Answer

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🥷
    Answer ✓

    You are missing an END statement for your CASE statement

    COUNT(DISTINCT CASE WHEN `Account.Status__c` LIKE 'Cancel%' THEN 'Canceled' END)
    


    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.

Answers