Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Reconnect PBIX file to another SQL server/instance

Hi folks!   As always, I need your wisdom.   I've done a Power BI report with my PC and direct query connected to a SQL server (Business Central ERP, if it can help) called "XXXXXX".   I need t...
  • ImkeF's avatar
    ImkeF
    6 years ago

     

    Hi

    you integrate parameters with escaping the text and an ampersand - at both sides: " & YourParameter & "

     

    So please try it like so:

     

    let
    Origen = Sql.Database("XXXXXX\BCDEMO", "Demo Database BC (14-0)"),
    #"dbo_" & YourParameter & "$Item Analysis View Budg_ Entry" = Origen{[Schema="dbo",Item="" & YourParameter & "$Item Analysis View Budg_ Entry"]}[Data]
    in
    #"dbo_" & YourParameter & "$Item Analysis View Budg_ Entry"