Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
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 "Source" if both Columns "Trans Type" and "SW Request Type" are BLANK. And also, it will capture the values of Columns Trans Type and SW Request if they're not empty.
Please see expected output below. ![]()
Source | Trans Type | SW Request Type | New Column
---------------------------------------------------------------------
GAPS | | | GAPS
HW | | | HW
SW | | SW CASE | SW CASE
SW | | Sold to CASE | Sold to CASE
SW Rqst | Channel | | Channel
SW Rqst | Oppty | | Oppty
Thanks you
Solved! Go to Solution.
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]
@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 ))
Proud to be a PBI Community Champion
@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 ))
Proud to be a PBI Community 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
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]
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 38 | |
| 37 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 67 | |
| 34 | |
| 32 | |
| 29 |