Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Merging 2 Power BIs

Hi Power BI community, 

 

I have 2 power BI files (both in different files and sources) and I would like to merge the 2 tabs together. Does anyone know if this is possible?

 

Thanks.

  • edhans's avatar
    edhans
    5 years ago

    Anonymous you have to select all queries you want. Easiest way is to select the first thing in your query list - either a query or a Group if you have created those. Then Shift-Click the last thing in that list. You can then either press CTRL-C to copy, or right-click all of the selected items and select copy.

    Then in the other file, right-click in the query listing area, and select Paste.

5 Replies

  • Please specify what you mean by "merge".  You can access a Power BI dataset from another Power BI file, you can copy/paste visuals between PBIX files, and you can (manually) copy/paste the Power Query code. 

    Are you looking for a way merge them without having to do much work?  Ain't gonna happen.

  • edhans's avatar
    edhans
    Community Champion

    As lbendlin indicated, you cannot just drag/drop data. However, if the reports have different underlying data, you can do this:

    1. Open file one. Open Power Query via Transform on the home ribbon.
    2. Open file two. Open Power Query.
    3. In file two, copy ALL queries in the Power Query window. Select all of them and press CTRL-C.
    4. In file one, press CTRL-V.
    5. Close and Apply in File one.
    6. In file two, just close.
    7. In file two, copy all visuals by selecting them, CTRL-C, then paste into file one.

    The only thing you will have to do now is:

    1. create relationships in the Model tab.
    2. Create measures and calculated columns if any. You copy the DAX code for this but not the measures/columns themselves.

    If the data sources in file 1 and 2 are similar or the same, but with different transformations, it can be a bit trickier as you will duplicate the sources and possibly have naming conflicts on the queries.

     

    WIth the December 2020 desktop update, you can also enable the preview feature for direct query of datasets. You could then create a third PBIX file that brought in the other two datasets and create visuals and relationships as desired. But that is in preview status, and would require 3 final reports vs consolating into 1. But if your first two reports are very complex with a lot of DAX, that might be faster.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous ,

       

      Tried your method but the control C and control V doesn't work on the power query... I also did not see any selection appeared when I press control-C. Please help!

      • edhans's avatar
        edhans
        Community Champion

        Anonymous you have to select all queries you want. Easiest way is to select the first thing in your query list - either a query or a Group if you have created those. Then Shift-Click the last thing in that list. You can then either press CTRL-C to copy, or right-click all of the selected items and select copy.

        Then in the other file, right-click in the query listing area, and select Paste.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello Anonymous 
    I also agree with the  lbendlin . 
    You can copy the table Power Query Code by doing right-click on it and simply paste in another report.

     

    If you have solved your problem, please mark the post as a solution so people who may have the same question can get the solution.

     

    If you still need help, please feel free to ask.