Forum Discussion
Table.FirstN function doesn't seem to work properly for my case...
But I have as many "each" involved/nested in my original code mixing Last/FirstN that I have in the Last/SelectRows version, so why is the context "clearer" in the second case ? Do parenthesis would help regarding this context issue ? Is this a known issue that Microsoft is going to address soon ? This seems crazy.. I mean my code is not yet very complicated and I can't already be sure that it is behaving as expected ? How can I check/debug what context is being use ?
Break your query into smaller steps, and use inline function to check/debug. You can also use the Query diagnostics to validate the results of each step.
If you like to learn M I can highly recommend the primer here
Power Query M Primer (Part 21): Identifier Scope & Sections | Ben Gribaudo