Forum Discussion
Pass parameters during retrieving the report PowerBI
- Anonymous6 years ago
Hi Anonymous,
Yes, I think it will fail at step #3.
You can't set multiple current values of one query parameter at the same time on the Power bi service side. So these users will receive the report with contents of the last user id you configured.For RLS with username, it will extract the current username as the parameter to filter records and apply to shared report contents if these users do not have edit permissions.
BTW, you can also parameterize your reports with query parameter as a template app then your users can get the app and use their owner user id to generate correspond apps contents.
What are Power BI template apps?
Create a template app in Power BI
Regards,
Xiaoxin Sheng
Anonymous
In your solution, our clients are forced to have an account on PowerBI. 😞
I found another method:
1. Create a report with Direct Query with parameter (where userId = ...)
2. When user log to our app then CLONE that workspace to the new one using: https://powerbi.microsoft.com/pl-pl/blog/duplicate-workspaces-using-the-power-bi-rest-apis-a-step-by-step-tutorial/
3. Set that "userId" parameter in the cloned report.
4. Show the client that cloned report.
5. Remove the workspace (using Cron) after some time.
I made a simple app and step 1,2 is done but I feel that it could be a big hack. What do you think?
Hi Anonymous,
Yes, I think it will fail at step #3.
You can't set multiple current values of one query parameter at the same time on the Power bi service side. So these users will receive the report with contents of the last user id you configured.
For RLS with username, it will extract the current username as the parameter to filter records and apply to shared report contents if these users do not have edit permissions.
BTW, you can also parameterize your reports with query parameter as a template app then your users can get the app and use their owner user id to generate correspond apps contents.
What are Power BI template apps?
Create a template app in Power BI
Regards,
Xiaoxin Sheng