Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am trying to include values in a new table from an existing table IF any one of the columns is not blank.
Here is my current query:
Solved! Go to Solution.
Hi @dwel0120 ,
It is easier to implement in Power Query Editor.
let
Source = Table.FromValue(GEO_ADULT),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {}, "Attribute", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Columns", each [Value] <> null and [Value] <> ""),
#"Selected Columns" = Table.SelectColumns(Source,List.Distinct(#"Filtered Rows"[Attribute]))
in
#"Selected Columns"
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @dwel0120
It is possible only if you have a fixed number of columns. If this is ok with you then I'll post my solution by tomorrow. Thanks!
Hi,
Try this kind of logic:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
That didn't work...
Hi @dwel0120 ,
It is easier to implement in Power Query Editor.
let
Source = Table.FromValue(GEO_ADULT),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {}, "Attribute", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Columns", each [Value] <> null and [Value] <> ""),
#"Selected Columns" = Table.SelectColumns(Source,List.Distinct(#"Filtered Rows"[Attribute]))
in
#"Selected Columns"
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Are you creating this as a blank query?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
9 |