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 moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi
I have a piece of M code that, I assume, was generated by AI.
In my Applied Steps it appears directly after the Navigation step.
Is someone out there able to explain what the 3 steps are doing.
The two steps afterwards, which I added, are both referring to the first step! I've not seen this before.
FilterNullAndWhitespace = each List.Select(_, each _ <> null and (not (_ is text) or Text.Trim(_) <> ""))
Removed Bottom Rows = Table.RemoveLastN(Sheet1_sheet, each try List.IsEmpty(List.Skip(FilterNullAndWhitespace(Record.FieldValues(_)), 1)) otherwise false)
Removed Bottom Rows = Table.RemoveLastN(Sheet1_sheet, each try List.IsEmpty(List.Skip(FilterNullAndWhitespace(Record.FieldValues(_)), 1)) otherwise false)
Hi, @Anonymous ;
Is your problem solved? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ,
In my understanding, the first step is to convert the record to a list, determine whether the list is empty after skipping the first line, and then delete it.
Do you have all M codes to verify (sensitive information can be removed)?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Are these part of the function?
each before List.Select is creating doubt
List.Select filter the data
Table.RemoveLastN rows
_ as the first parameter in List.Select seem like it is part of a function
Hi amitchandak
It does seem that the function is a precursor to determine which Rows to delete, but, I don't understand the syntax.
The two rows after the FilterNullAndWhitespace should have been:
#"Removed Bottom Rows" = Table.RemoveLastN(Sheet1_sheet, each try List.IsEmpty(List.Skip(FilterNullAndWhitespace(Record.FieldValues(_)), 1)) otherwise false),
#"Removed Top Rows" = Table.Skip(#"Removed Bottom Rows", each try List.IsEmpty(List.Skip(FilterNullAndWhitespace(Record.FieldValues(_)), 1)) otherwise false),
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 |
|---|---|
| 30 | |
| 24 | |
| 23 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 61 | |
| 35 | |
| 30 | |
| 23 | |
| 22 |