Forum Discussion

jha_clevertrack's avatar
jha_clevertrack
Frequent Visitor
6 years ago
Solved

Using parametre in url rp:

Hi, Im new to power-Bi.

 

I want to use the parametre transfer in url, I have created a parametre in my report called recID, as text and with a value, and in my DirectQuery Im using it directly:

let
    Source = Sql.Database("sql address", "database name", [Query="select * from account_vehicle_online where id ="&recID])
in
    Source

 

And its working when setting the default value in Parametres inside Power-Bi desktop, but when trying to set it from the url when calling the report embedded, its not reading the value:

 

https://app.powerbi.com/reportEmbed?reportId=b361c01e-522f-41e3-95c0-22570dd955cf&rp:recID=2&autoAuth=true&ctid=8241f09b-534c-418b-91ef-4581dbe47a36&config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly93YWJpLXdlc3QtZXVyb3BlLWQtcHJpbWFyeS1yZWRpcmVjdC5hbmFseXNpcy53aW5kb3dzLm5ldC8ifQ%3D%3D

 

Any suggestions?

Any links to a working sample?

 

Kind regards 

Jan

  • v-lid-msft's avatar
    v-lid-msft
    6 years ago

    Hi jha_clevertrack ,

     

    If you are using common report, we can use the following workaround:

     

    1. create a dim table and create relationship between fact table:

     

     

    RecordParm = DISTINCT('Table_A'[record])

     

     

     

    2. use query string parameter: https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters

     

     

    the fact table is still in directquery and will get nessary data based on value of the dim table

     

    Update: in addition, the fact table does not use sql statement. Note that if there is no value assigned in url string parameter, it will retrieve all the ids.


    Best regards,

     

3 Replies

  • v-lid-msft's avatar
    v-lid-msft
    Community Support

    Hi jha_clevertrack ,

     

    It seems like a common report instead of rdl report? Based on this document, the rp: URL parameters can only work for Paginated Reports .Please refer this documentation to get more information about URL parameters in Paginated report.

     

    If it is  actually a rdl report, please try to change the parameter to refresh data when changed.

     

     


    Best regards,

     

    • jha_clevertrack's avatar
      jha_clevertrack
      Frequent Visitor

      Thanks alot for the answer, so this param transfer is only possible in rdl, and not in common reports?

      Any other ways to make a parametre transfer in common reports, we need the DirectQuery and interactivity.

       

      Kind regards

      Jan

      • v-lid-msft's avatar
        v-lid-msft
        Community Support

        Hi jha_clevertrack ,

         

        If you are using common report, we can use the following workaround:

         

        1. create a dim table and create relationship between fact table:

         

         

        RecordParm = DISTINCT('Table_A'[record])

         

         

         

        2. use query string parameter: https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters

         

         

        the fact table is still in directquery and will get nessary data based on value of the dim table

         

        Update: in addition, the fact table does not use sql statement. Note that if there is no value assigned in url string parameter, it will retrieve all the ids.


        Best regards,