Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

"Key didn't match any rows" error message while trying to combine & edit files form Folder

Hi

 

I'm trying to set up a demo of a Power Query to merge data from 3 multi-worksheet files.

 

Each of these files has 2 worksheets, "RedStreet" and "GreenStreet", containing some simple sales data, e.g. 

I thought combining & editing them in Poweqr Query woudl be simple, but I get this error message when I try

 

 

The data is at https://1drv.ms/f/s!AmxJyApgEAcYgu1skajh8qGz07yrsw

 

Could anyone help?

 

Thanks!

  • Stachu's avatar
    Stachu
    7 years ago

    you're welcome :smileyhappy:

    Did I answer your question? Mark my post as a solution!

    Proud to be a Datanaut!

3 Replies

  • Stachu's avatar
    Stachu
    Icon for Community Champion rankCommunity Champion

    I can combine the files without any problem as long as I use the sheet name (same for all the files) and not the table name (different per year)
    so for GreenStreet the M code in the 'Transform Sample File from ...', in the advanced editor should look like this

    let
        Source = Excel.Workbook(#"Sample File Parameter1", null, true),
        GreenStreet_Sheet = Source{[Item="GreenStreet",Kind="Sheet"]}[Data],
        #"Promoted Headers" = Table.PromoteHeaders(GreenStreet_Sheet, [PromoteAllScalars=true])
    in
        #"Promoted Headers"

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you Stachu!

      • Stachu's avatar
        Stachu
        Icon for Community Champion rankCommunity Champion

        you're welcome :smileyhappy:

        Did I answer your question? Mark my post as a solution!

        Proud to be a Datanaut!