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
calhounco
New Member

Removing a Row based on all rows being blank except in the first column.

I query from a file folder that includes multiple files (for this example those files are TEST3 & TEST4 shown in Column A) and all those files have the same type information with the same column headers.  The only problem I have is when I run a query it pulls all the blank rows.  I tried removing blank rows, but since my Column A is not blank it will not remove them. Is there a code I can place in the Advanced Editor on the Query Editor to remove rows that are completely blank even when Column A shows up with the title of the file?

Example.PNG

2 REPLIES 2
jthomson
Solution Sage
Solution Sage

You can do this in query editor - I'd make sure that all of the blank data is formatting as nulls, then make a custom column that's something like

 

columntogetridoftheblanks = if column1 = null and column2 = null and ...(repeat for all your columns) then "delete" else null

 

You can then filter out anything that says delete in the new column. Probably a more efficient way to do this though

Sounds like something that would work. I just do not know much about the certain code that would be required for this action. Any help would be good.  Thank you.

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.

Top Solution Authors