Forum Discussion
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:
Any suggestions?
Any links to a working sample?
Kind regards
Jan
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-msftCommunity 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_clevertrackFrequent 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-msftCommunity 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,