Forum Discussion

CatInATuxedo's avatar
CatInATuxedo
Regular Visitor
1 year ago
Solved

Is it possible to have more than one sample file?

Greetings all, 

 

I've been stuck on this for quite a while, and no amount of browsing or Copilot is helping.

 

I have a folder with many Excel files within it. The files have many sheets, however I am only interested in two sheets: let's call them "Apples" and "Pears". Connecting to the folder in Power BI, I'm able to edit the "Transform Sample File", and in doing so, obtain another query with all the "Apples" sheets appended together with the same transformation. Perfect.

 

Problem is, the "Pears" sheet requires different transformations, and so can't just be appended onto the end of "Apples" because the columns are different (if that's even possible). Is there any way to have two sample files, so I can repeat the process described above with the other sheet? I have tried duplicating the queries and functions and all sorts, nothing seems to work. 

Thank you

  • Thank you for your answer, first of all. From it, I have just discovered that I can do the entire process as I described again (in the same file), and it solved the problem. I thought the importing process was just a one-time ordeal.

    Now I feel like a real idiot. So you're saying I should get rid of all the code and try and do it from scratch? What's wrong with it as it is (with all due respect)?

5 Replies

  • The "Combine Binaries"  function is a convenience for novice developers.  Once you have read and understood the created Power Query code you are supposed to delete all of it including all the other files and the group and never press that button again. 

     

    Create your own ingestion code as a function, inline or separate.

    • CatInATuxedo's avatar
      CatInATuxedo
      Regular Visitor

      Thank you for your answer, first of all. From it, I have just discovered that I can do the entire process as I described again (in the same file), and it solved the problem. I thought the importing process was just a one-time ordeal.

      Now I feel like a real idiot. So you're saying I should get rid of all the code and try and do it from scratch? What's wrong with it as it is (with all due respect)?

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        It adds all these artifacts you are showing here and it loads the sample file twice.