Forum Discussion

Pillz_'s avatar
Pillz_
Frequent Visitor
5 years ago

Pass parameter into Web Source URL based on another parameter

I have a Projects table that contains the project's ID and Name that's imported as a Web Source. The URL and contents imported are generated from the site's REST APIs.  (URL.com/projects.xml). Each project has many issues objects associated with it which can be pulled via: (URL.com/issues.xml?project_id=X)

 

My end goal is to have the issues objects datatable dynamically change based on the project selected by the user. 

Currently, I have 2 parameters for both ID and Name. Based on the Name parameter changed by the user, I want to pass that project's ID that matches the name selected into the URL to pull the issues for that project: (URL.com/issues.xml?project_id=ID_Param).  

Is this doable in PowerBI or will I have to import all the issues in a seperate table (URL.com/issues.xml)


1 Reply

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    You have two ways you could go on this:

     

    1. Make queries that have parameters for ID and project as inputs, save it as a template file (pbit).  When each user opens the pbit, they will be prompted to select project and/or ID and then the data will load.

     

    2. Recommended - load all the data into your model.  Starting with a table of projects and ID values, you can concatenate each into web calls, and then expand that column of tables for the fields you want to append all the data.  Then have a slicer for the use to filter to the desired projects and/or IDs.

     

    Regards,

    Pat