Charting

Charting

Unify two filters in one Beast mode function ?

Hello,

In a card, I edited a Beast Mode function in order to combine two filters:

  • (case when (`Distributors`='DistributorA' and `Country`='CountryA') then 'Distributors'

else 0

end)

  • (case when (`Country`='CountryB') then 'Distributors'

else 0

end)

I would like to combine these two in one unique Beast Mode function like a UNION function or a + function, however I can't find the good syntax for that.


Thank you in advance.

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In

Best Answers

  • Answer ✓

    You would just create multiple WHEN statements. You can have as many WHEN statements as you want in a CASE statement. Yours would look like this:

    (case when (`Distributors`='DistributorA' and `Country`='CountryA') then 'Distributors'

    when (`Country`='CountryB') then 'Distributors'

    else 0

    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.
  • Answer ✓

    @Gor_Gonzalez , you're welcome! If you can mark the answer as accepted, it will help others in the community.

    **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

  • Answer ✓

    You would just create multiple WHEN statements. You can have as many WHEN statements as you want in a CASE statement. Yours would look like this:

    (case when (`Distributors`='DistributorA' and `Country`='CountryA') then 'Distributors'

    when (`Country`='CountryB') then 'Distributors'

    else 0

    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.
  • Thank you Mark for your help !

  • Answer ✓

    @Gor_Gonzalez , you're welcome! If you can mark the answer as accepted, it will help others in the community.

    **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.

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In