This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
When cleaning up your datasets in #PowerQuery, the default option "Remove empty" is often used to eliminate blank rows. However, there's a caveat to be aware of: not all "blanks" are truly empty. Some may just be spaces which the default option won't catch.
To ensure a comprehensive cleanup, modify your M code as follows:
**Original Code:**
```m
= Table.SelectRows(#"Removed Columns2", each [Sales Doc.] <> null and [Sales Doc.] <> "")
```
**Improved Code:**
```m
= Table.SelectRows(#"Removed Columns2", each [Sales Doc.] <> null and [Sales Doc.] <> "" and [Sales Doc.] <> " ")
```
This enhancement ensures that rows with spaces posing as "blanks" are also removed, leading to a cleaner dataset.
---
Hope this helps, and happy data cleaning! 🙂
.
.
.
.
.
.
#powerbi #dataanalytics #dataanalyst
There is also a good option which is TRIM everything to avoid unnecessary characters 😉 : https://radacad.com/trim-vs-clean-in-power-bi-and-power-query
Hello Rada,
Upon reviewing your website, I noted that the trim function is an effective solution for eliminating superfluous characters, as you mentioned. It appears that your dataset contains some unnecessary characters on certain rows. Conversely, in my dataset, I observed purely blank rows. By employing the default 'delete nulls' option in Power BI, I was able to remove a majority of the nulls present in the files. However, some of the rows that seemed to be nulls were actually spaces, which led me to enhance the code with an additional condition to eliminate spaces: [Sales Doc.] <> " " : )
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |