Forum Discussion

RenateBK's avatar
RenateBK
Helper II
3 years ago

How to remove rows where data is missing in specific columns (without using filtering)

Hello, 

 

I have a dataset which is not perfectly cleaned and some rows with wrongful data has been included.

I need to remove these specific rows to avoid confusion and using the "filter" function by just unchecking "null" for the column is not a viable option and removing "blank rows" doesn't work as one cell in the row includes data. 

 

Thus I am wondering if it is possible to create a function where x row will be removed if there is "null" in y column?

 

(I borrowed the example image from another thread as it illustrates my needs, but doesn't have a solution I can use: https://community.powerbi.com/t5/Desktop/Delete-all-the-row-when-there-is-null-in-one-columns-of-the/m-p/156051)

 

Thank you, 

Renate

2 Replies

  • ITManuel's avatar
    ITManuel
    Responsive Resident

    Hi RenateBK ,

     

    from what I know you can only "remove" rows by filtering them out. What is the issue with filtering blanks on the specific column?

     

    You can do that either in PowerQuery or in DAX for the calculations you want to carry our, thus all rows in which there are blanks in the specific column are not present because ignored.

     

    Br

    • RenateBK's avatar
      RenateBK
      Helper II

      The main issue is mostly just consistency as there is a risk that it will be forgotten because I have to filter it out in 10+ different data sets. 

       

      However, I think I managed to come up with an easy solution. I simply sort the column with the missing data from "a to z" then I can remove x amount of top rows that's empty without any issue. 

       

      Br