Forum Discussion
sbacalso
7 years agoFrequent Visitor
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...
- 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]
- 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 ))
themistoklis
7 years agoCommunity Champion
if [Trans Type] = null and [SW Request] = null then [Source]else if [Trans Type] <> null then [Trans Type] else if [SW Request] <> null then [SW Request] else "No Value"
You can insert the above formula in a new column