COUNT(DISTINCT CASE WHEN THEN)

Nathan_Mahler
Nathan_Mahler Utah βšͺ️

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)
    


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

Answers

  • Nathan_Mahler
    Nathan_Mahler Utah βšͺ️

    Oh I should've noticed that, ahh well rookie mistake