Forum Discussion

sbacalso's avatar
sbacalso
Frequent Visitor
7 years ago
Solved

Nested IF - powerquery

Hi, Good day. Im just new in Power Query and I have a situation. I have columns "Source", "Trans Type", "SW Request Type" and I want to create new column that will capture the values of Column "So...
  • petrovnikitamai's avatar
    7 years ago

    try to add custom column and use 

    = if [Trans Type]<>null then [Trans Type] else if [SW Request Type]<>null then [SW Request Type] else [Source]

  • PattemManohar's avatar
    7 years ago

    sbacalso Just an another way of doing without multiple IF statements.

     

    Add a custom column as below in "Power Query Editor"

     

    =List.Last(List.Select({[Source], [TransType], [SWRequestType]}, each Text.Length(_) <> 0 ))