The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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?
This is an old post, but still worth recording the best solution I've seen so far:
#"Removed Blank Rows" = Table.SelectRows(#"Previous step", each not List.IsEmpty(List.RemoveMatchingItems(List.Range(Record.FieldValues(_),1,Table.ColumnCount(#"Previous step")-1), {"", null})))
The advantage is that you don't need to know how many columns you have.
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.
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
46 |