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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Need help in removing blank rows

Hi

 

I have raw data table in which there are about 4 rows that i want to remove which are blank in a particular column. I am choosing the column > Transform Data > Home > Remove Rows > Remove Blank Rows... but this is not working. What am i doing wrong? Also, i dont mind leaving them but how do i uncheck (blank) from the visual?

2 ACCEPTED SOLUTIONS
AllisonKennedy
Super User
Super User

Click on the View tab in Power Query editor and tick the box to turn on the Formula bar so you can see what the code is that happens when you click the buttons. I believe remove blank rows only removes rows that are entirely blank, while remove errors removes based on selected column. To remove blanks from a specific column, just use the arrow on the column heading to filter the column and untick blank/null values.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

Yes, so since those countries are excluded from your Country table, they will appear as Blank in the visual. You can just filter the visual to exclude blank in this case, or you will need to apply additional filter in the raw data to remove them from all tables.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

11 REPLIES 11
AllisonKennedy
Super User
Super User

Click on the View tab in Power Query editor and tick the box to turn on the Formula bar so you can see what the code is that happens when you click the buttons. I believe remove blank rows only removes rows that are entirely blank, while remove errors removes based on selected column. To remove blanks from a specific column, just use the arrow on the column heading to filter the column and untick blank/null values.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Anonymous
Not applicable

Hi

I ran into a problem, am trying to build a connection with the same table. So i have the raw data table in which i have country column which has duplicates so am uploading a file with the list of the unique countries. when i connect the both, the (blank) re appears, why? I have applied filter (Blank) to that column and the Unique Country List table does not have any blank.

Do you mean the blank appears in a chart or other visualization? This is usually because the country data doesn't have an exact match so blanks will appear in the visualization.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Anonymous
Not applicable

It appears in the visual as (blank) with values 0, the country list is exactly the same but just doesnt include duplicates.

I am assuming that you have the following setup:
DimCountry table with [Country] column with unique values.
Fact table with [Country] column with duplicates and [Value] column.

Visual (let's use matrix for this example) with DimCountry[Country] in Rows and Fact[Value] in Values.

Add Fact[Country] to the rows under DimCountry[Country] and expand the blank section to see which countries appear. Those are the ones without the match - maybe there's an added space or difference in capital and lowercase or something similar?

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Anonymous
Not applicable

You are exactly right and those are the countries i want to exclude as they will not have any values ever. that was the whole idea of having a separate table wxluding these countries so i can choose DimCountry for visuals

Anonymous
Not applicable

Sorry, you are right, the raw data includes some countries to which i will never receive any data, hence want to exclude. Is this the reason?

Yes, so since those countries are excluded from your Country table, they will appear as Blank in the visual. You can just filter the visual to exclude blank in this case, or you will need to apply additional filter in the raw data to remove them from all tables.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Anonymous
Not applicable

Got it! Thanks so much

You are going in the right direction.  Just do the little workaround if you are not getting from your action.

Go to transform query editor  > select the column on which you wanna remove blank values then click on the small down arrow icon to get the list of values that are available on this column>  uncheck the "null" value > Save and apply this changes.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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