Forum Discussion

ipon70's avatar
ipon70
Helper I
2 years ago
Solved

Dynamically Change Query Source

Hopefully I didn't miss this being answered elsewhere.

What I am trying to do is have an excel file called "Feed". Inside the "Feed" file in the first column and row is a link "\\network\scr\data\cube\" . That link sits in row 1 column A.

I would like to use that to change the source of another query.

Currently the main query gets data from "\\network\scr\data\cube\fillings.xlsm" I would like to be able to change the "feed" "\\network\scr\data\cube_model\fillings.xlsm" and have the main query update to that source path.

So basically one excel file updates the path for another query inside the same report. The "feed" path wouldn't change, just the other queries it feeds.

 

I hope that makes sense, please reach out if you need more information.

 

  • You can parameterize the source and then save your file as a Power BI Template.  That way the user will be asked to provide the parameter value upon opening.

4 Replies

  • Is that only for local processing or are you expecting this to work in the Power BI Service (hint: it won't) ?

    • ipon70's avatar
      ipon70
      Helper I

      This would be if someone downloads the report to work on their local desktop and it needs a different source before being uploaded.

       

      • lbendlin's avatar
        lbendlin
        Super User

        You can parameterize the source and then save your file as a Power BI Template.  That way the user will be asked to provide the parameter value upon opening.