Case statements for grouping

Hi Community : )
I have a question regarding the grouping with cases. So, I have a column with lots of company names and some of them are the same company, but written differently e.g. Amazon, amazon, amazonde, etc. So my goal is to create a new column in which "Amazon" is set if the other column with company names contains Amazon. I manage to write a case for that and it worked. This is my written case: case(contains(lower([Publisher]), "amazon"), "Amazon", [Publisher])

But I not only want to do this for one company, but also for about 10 more. So my question is, how do I write the case so that the new column groups by all mentioned company names I want to have grouped?

Thanks in advance!
Isa

Hi @Isa
There's no magic you can apply unless there's some logic to the strings:

case(contains(regexextract(lower([Publisher]), "amazon.*"), "amazon"), "Amazon", [Publisher])

Think this is where you'll want to model your data in SQL, which would allow you to do more advanced queries.

Hi @flamber,

Thank you! I'll probably work with SQL then!