Forum Discussion
Power Query - removing all columns with no values?
- Anonymous10 years ago
Hi igaca,
Based on my understanding, you want to remove the null value column with power query, right?
If as I said, you could follow below steps:
1. Create a test table, and load it to power bi, click 'edit query'.
2. Select all of the table and click the ‘Unpivoted Columns’.
3. Choose the first Column and click ‘Removed duplicates’, then modify the query to remove the second column.
Modify:
Table.Distinct(#"Unpivoted Columns", {"Attribute"}) => Table.Distinct(#"Unpivoted Columns", {"Attribute"}) [Attribute]
4. Click on ‘fx’ to add a custom step:
Use Table.SelectCoulmns function to get the specify columns:
For more detail info, you could refer to below link:
Video_017 How to Remove Null Columns with Power Query?
Regards,
Xiaoxin Sheng
Are you wanting to filter it out during the query?
With my query when I didn't want 'null' or blank to be pulled from a specific column, I did this formula:
([Posted Source ID] <> null and [Posted Source ID] "")
*Posted Source ID was the column I was wanting to filter out
Hope that's what you're looking for.