cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
calhounco Frequent Visitor
Frequent Visitor

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 New Contributor
New Contributor

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

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

calhounco Frequent Visitor
Frequent Visitor

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

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
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Ideas
Users Online
Currently online: 73 members 1,139 guests
Please welcome our newest community members: