Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Changing Power BI Data Source to Migrated Dataverse Tables

Hi, I hope you're all doing well. My company recently migrated the backend data of an existing Power BI dashboard from on-premise SQL storage to Microsoft Dataverse. During this migration, some tabl...
  • Cookistador's avatar
    1 year ago

    Hello,
    The first thing is to make a mapping of your table name and field

    For example:
    SQL Table: Customers -> Dataverse Table: Accounts
    SQL Column: CustomerID -> Dataverse Column: accountid

    ....

    Connect to dataverse as a datasouce and, then create a copy of the first query you want to update and modify the connector with advance editor (modify the source and not the copied, the copied source is just a back up)

    It should like

     

    Source = Sql.Databases("YourSQLServer", "YourDatabase"),
    YourTable = Source{[Name="YourTable"]}[Data],
    #"Renamed Columns" = Table.RenameColumns(YourTable,{{"CustomerID", "OldCustomerID"}})

     

    Source = CommonDataService.Database("YourDataverseEnvironment.crm.dynamics.com"),
    YourTable = Source{[Name="accounts"]}[Data],
    #"Renamed Columns" = Table.RenameColumns(YourTable,{{"accountid", "OldCustomerID"}})

     

    Once everything is imported use the "Rename Columns" transformation to align the new Dataverse column names with the old SQL column names. This is crucial for maintaining relationships and measures.

     

    Once that is done, you can close and apply, if you have error message, reopen power queyr and continue to fix

     

    Do not hesitate to ask if you need more details for a specific point, it is a general approach