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.

Best Answers

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🟀
    Accepted 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)

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🟀
    Accepted Answer

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

Answers

Sign In or Register to comment.