Forum Discussion
Combine and transform issue - Expression.Error: The key didn't match any rows in the table.
- 3 years ago
Hi dozer_1985,
The reason why it fails with the wildcards is because PQ does not understand the wildcards (not in this case). The Source{0} fails where the required datasheet is not always your first tab (it is internal indexing, nit necessarily reflecting the order of tabs in the book).
There are few ways to resolve it:
1. Just filter the Source to select only items containing Sheet_Suffix (kind of forcing the wildcard): Text.Contains ([Item], "Sheet_Suffix"). Then you should be able (I presume) to use #"Sheet_Suffix" = Source{0}[Data].
2. Alternatively (and in some other cases maybe more reliably) something like: #"Sheet_Suffix" = Source{[Item=Parameter2 & "_Sheet_Suffix",Kind="Sheet"]}[Data] or whatever is needed to dynamically set the sheet name from your filename and the suffix.
Kind regards,
John
Hi dozer_1985,
try this one: Power Query M Primer (part 1): Introduction, Simple Expressions & let | Ben Gribaudo
I would describe it as quite advanced level and you will not need most of the concepts covered in the course, but this will give you exact that - concepts that underlying the M application. I personally refer to it quite often. This is a very good starting point for your M journey.
Another good reading is Chris Webb's BI Blog Chris Webb's BI Blog (crossjoin.co.uk), but this is not a "course", there is a lot of information that you may find not applicable in your day-to-day work, but some of the posts are eye-opening.
Other than that just general search on the Internet. When I was learning M it was context/tasks orientated seach to solve a particular issue. The more you code the easier it becomes.
Cheers,
John
Will check them out. Thanks again.