Is it possible to count a value depending on other values?

Hello,

I have a big table with different kind of data and I want to create a calculated filed that counts how many "active" status do I have depending on the month, client and country.

For example, I want to know how many activate status do I have in January for Client A, which is in Country A.

This is an example of my data in DOMO which is bigger.

Thanks

Best Answer

  • MichelleH
    MichelleH Coach
    edited March 2023 Answer ✓

    @eduardon A case statement inside a count function should give you what you need:

    count(distinct case when `Status` = 'Active' then concat(`Month`,`Client`,`Country`) end)
    

Answers

  • MichelleH
    MichelleH Coach
    edited March 2023 Answer ✓

    @eduardon A case statement inside a count function should give you what you need:

    count(distinct case when `Status` = 'Active' then concat(`Month`,`Client`,`Country`) end)
    
  • eduardon
    eduardon Member
    edited March 2023

    @MichelleH Excellent, it works! Clever way to use the CONCAT formula.

    Have a good day!