Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
ooptennoort
Advocate I
Advocate I

(get list with) count of non-null values of each of multiple columns

I have a data set with >100 cols, most of which contain only 1 value (useless). I need to remove these so I have cols left with >1 value (the good stuff).

 

So it seems to me I somehow need to List.Select all the List.NonNullCount >1 for each _column (which suggests using Table.ColumnNames) but I just can't figure out how to put these together, followed of course by Table.SelectColumns with that list (the easy bit)

 

Any ideas (chatGPT provided absolute crap)?

1 ACCEPTED SOLUTION
ppm1
Solution Sage
Solution Sage

If all of the empty columns show as "null", you can unpivot those columns and the null rows will not be kept. You should consider keeping it unpivoted, but you can pivot it back out if needed. If they con't show as "null", you can unpivot and then filter out all the ones w/o values (blank).

 

Pat

Microsoft Employee

View solution in original post

2 REPLIES 2
ppm1
Solution Sage
Solution Sage

If all of the empty columns show as "null", you can unpivot those columns and the null rows will not be kept. You should consider keeping it unpivoted, but you can pivot it back out if needed. If they con't show as "null", you can unpivot and then filter out all the ones w/o values (blank).

 

Pat

Microsoft Employee

So simple! Thanks!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors