Forum Discussion
Changing Dashboard Data Source Dynamically
Many thanks for the feedback. Let me add some information to clarify a bit more the scenario.
I indeed have the data refreshing solved with a power Automate action, that is so far working correctly. What I am concerned now is how to make the system work for many people at the same time. I had more or less come the conclusion that I needed to use parameters for this and I have a fair part of the way clear on how to do it but there are 2 main inconvenients:
- Since I am using Sharepoint folder as a data source I cant use dynamic M parameters ( I do not get the "Bind to parameter" option in the model view since this data source is not Direct Query).
- I am not sure on how to update the parameters. UI in PowerBI service doesnt seem to be an option since it does not show to the final users (my colleagues) as they are not the owners of the dataset, also it is not the most user friendly and neat option. Lastly for the REST API this is totally new world for me (also in the Learn article it states you have to be the owner of the dataset in order for this to work). I dont think my colleagues hace the technicall prowess to use powershell and run this commands. The only potential workaround for this would be to implement a python script ( I do have some python knowledge) in the report that could run a post command but I dont know if I can do something with it in the report itself.
Regarding credentials or RLS that is not a concern at all. The issue is not related to people having a certain access or belonging to a specific region or country.
In summary the concept of this "tool" is:
My organization has service specialists that take care that customer performance is as expected and some level of proactive work is expected.
I want to develop a tool where these specialists gather the information from whatever customer they are currently focused on ( this can change with time, as they finish one task they will move to another customer, and they are not bound to a specific one), they input the information onto a sharepoint folder structure and then log into PowerBi service, hit the refresh data button and get their report ready witht all the visualizations that help them gather insights.
Up to here this tool is fully working ( still in test phase) but the next challenge is:
Tom is working with customer A data, he loads the data and refreshes the report for him to work.
Jerry is working with customer B data, he loads the data (removing Toms customer data in the process) and refreshes the report.
Tom is going to eventually finds his report destroyed because Jerry loaded different data and started wotking with it.
To avoid this I thougth of the multifolder structure inside the Sharepoint and Tom would have a folder A ( for customer A data) and refresh the report telling it that its data source is Folder A while Jerry would load his data into Folder B( customer B data) and refresh the report telling it that its data source is Folder B.
I dont even know if this would actually work but I am actually struggling to even make it possible.
I am still searching through all the options to see if I come up with something. Many thanks for the help!!
- v-yueyunzh-msft3 years agoCommunity Support
HI, AutoJL
Thanks for your quick response!
For your questions, this is my understand:
(1)Since I am using Sharepoint folder as a data source I cant use dynamic M parameters ( I do not get the "Bind to parameter" option in the model view since this data source is not Direct Query).When we create a variable in Power Query, we can directly use the variable name to refer to the variable we created and you do not need to use the UI to select , like this:
(2)That's right, if we have created a parameter, we need to modify it in the UI interface or using the REST API.
(3)For your scenario, you seem to be designing for people who develop reports. You want different people to create reports in different data environments. First of all, for imported datasets, a dataset can only have one copy of imported data. Even if you modify the path of the data source through M query, the previous data will be overwritten after refreshing. We can indeed implement the operation of switching data sources after refreshing, but we cannot allow different people to see different data at the same time for development.Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly