cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jmclej2
Resolver I
Resolver I

How to keep all the rows where a specified column is empty

Hello,

When I select a column, I can go to the menu "Reduce the rows", then it presents me 2 options : keep rows / remove rows. Within "Remove rows", I have 6 options, including "remove empty rows". But within "keep rows", there are only 5 options and nothing linked to th eempty rows, why is that ?

Basically, I want a step that keeps all the rows where a specified column "xxx" has empty values. How can I do that please ?

1 ACCEPTED SOLUTION

Ok, I did that but only "remove empty elements" was present, so I inversed the code and it is fine now :

= Table.SelectRows(Source, each [xxx] = null or [xxx] = "")

View solution in original post

3 REPLIES 3
edhans
Super User
Super User

The Keep Rows and Remove Rows buttons are for the entire table, no column logic.

Go to the column you are interested in and click the dropdown.

edhans_0-1675272660077.png

Then you can apply some very specific logic with special filters (1) or by checking/unchecking things in the list (2)

edhans_1-1675272714282.png

 

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
HotChilli
Super User
Super User

All GUI features are a front-end for a bit of code.  I presume MS will take a view on what they think is useful.

For your case, I think you want to click on the dropdown on the relevant column header.  You can filter using one of the choices there.  You can also edit the code (once it's in the query steps) and change it if it doesn't quite meet your needs

Ok, I did that but only "remove empty elements" was present, so I inversed the code and it is fine now :

= Table.SelectRows(Source, each [xxx] = null or [xxx] = "")

Helpful resources

Announcements
Winner of T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Find out who won the T-Shirt Design Challenge and the top 3 finalists.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

Top Kudoed Authors