Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Changing dataset source in composite model without re-importing measures

Hi all,   I have a composite model which links to two datasets and I want to move both the datasets and also this composite model onto a different tenant/workspace.   I thought this would be simp...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    I faced a similar situation as you did. Meaning, that when I changed to Direct Query connection using the Power BI Desktop I was forced to re-import all the tables and measures. Unfortunately, that caused the same result as you described above. However, in my case the tenant and workspace remained the same BUT the name semantic model had changed. Thus, I found a solution for me that might work for you as well.

     

    At this point, I wanted to thank Morten Lønskov from Tabular Editor team for helping out. 😃 Much appreciated.

     

    Thus, that’s what I did:

     

    1. Backup PBIX file
    2. Open File with “old connection” with Power BI Desktop
    3. Save it as Power BI Project File (.pbip)
    4. Open the PBIP file using Tabular Editor 2
    5. Under [Model] > [Shared Expression] you will find one or multiple connections named such as “DirectQuery in AS – [name of the semantic model]”
    6. In the [Expression Editor] I changed the name workspace (if needed) as well as the name of the semantic model
    7. Because I had 3 connections I changed all 3 of them
    8. Open the PBIP file with the Power BI Desktop
    9. Save file as PBIX and upload it to the Power BI Service

     

     

     

    That even worked out without the feature [Allow unsupported Power BI features (experimental)] turned on.

     

    However, I was not able to change the shared expression within the PBIX file directly using Tabular Editor (via connect to local instances feature). Thus, I guess you have to do it via the Power BI Project File. Furthermore, I haven’t test it using a Power BI template file (PBIT) but it might work as well.

     

    Additional information can be found here:

     

     

    Cheers,

    Dom