Forum Discussion

BookBok's avatar
BookBok
New Member
7 years ago
Solved

Replace multiple values using IF NOT while using one column as a reference

Hi,

In a table that has Countries and Regions I want to convert the Region to text "ALL" but not for 5 countries.

This is, I want to keep the region only for Australia, Canada, China, India, and USA, any other Country I want to replace the region the account may have to ALL.

I know how to do it in Excel, but I need it in PowerBI for a dinamic report.

Where can I find the steps on how to create this column?

Regards,

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi BookBok,

     

    You can create a new calculated column with following formula:

    New Region = 
    If(table[Countries] in {"Australia","Canada","China","India","USA"},
       table[Countries], "All")

    I hope this help.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi BookBok,

     

    You can create a new calculated column with following formula:

    New Region = 
    If(table[Countries] in {"Australia","Canada","China","India","USA"},
       table[Countries], "All")

    I hope this help.