The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
7 |