Forum Discussion

gtamir's avatar
gtamir
Post Patron
8 years ago
Solved

if is null

I want to use the expresion "if is null" to replace the "mobile" column with null, with the value in the same row in column "phone".

  • Hi
    I test using a simple dataset as follows.
    In Query Editor->Advanced editor
    add code
    mobile= Table.ReplaceValue(#"Changed Type",each [mobile], each if [mobile]=null then [phone] else [mobile] , Replacer.ReplaceValue,{"mobile"})
    #"Changed Type"->this table
    you will see
     
    Best Regards
    Maggie

1 Reply

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support
    Hi
    I test using a simple dataset as follows.
    In Query Editor->Advanced editor
    add code
    mobile= Table.ReplaceValue(#"Changed Type",each [mobile], each if [mobile]=null then [phone] else [mobile] , Replacer.ReplaceValue,{"mobile"})
    #"Changed Type"->this table
    you will see
     
    Best Regards
    Maggie