Forum Discussion

joannageorge's avatar
joannageorge
Frequent Visitor
5 years ago
Solved

Power Query returning FALSE

Hi everyone.

 

I am trying to convert Doman Building Materials Group Ltd into a Industrial type in Power Query. Currently, it is under Distribution. 

 

I created a Custom Column with this code:

= if [Sold To Channel Name] = "DISTRIBUTION" and [Sold To Customer Group Name] = "DOMAN BUILDING MATERIALS GROUP LTD." then [Sold To Channel Name] = "INDUSTRIAL" else [Sold To Channel Name]

 

However, the results show the value as FALSE, when I need it to display as INDUSTRIAL. See screenshot below. 

Appreciate your help on this 🙂

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    You were close!  Try:

     

    = if [Sold To Channel Name] = "DISTRIBUTION" and [Sold To Customer Group Name] = "DOMAN BUILDING MATERIALS GROUP LTD." then "INDUSTRIAL" else [Sold To Channel Name]

     

    --Nate

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    You were close!  Try:

     

    = if [Sold To Channel Name] = "DISTRIBUTION" and [Sold To Customer Group Name] = "DOMAN BUILDING MATERIALS GROUP LTD." then "INDUSTRIAL" else [Sold To Channel Name]

     

    --Nate