Forum Discussion
End User ability to change SQL query parameters
Hey clqLoveSpace
to some extent this can be achieved using query parameters:
https://docs.microsoft.com/en-us/power-query/power-query-query-parameters
But you have to be aware that this will only work, when the user(s) has access to the Power BI desktop file, as soon as the pbix gets published there will be (and also should) be one dataset that is shared between your users. Whenever a user changes the parameter values, that data will change and all other users will be affected.
Hopefully this provides you with some additional ideas.
Regards,
Tom
- clqLoveSpace6 years agoAdvocate II
Hi Tom
Thanks for responding - that's useful to know but it being only available for the end user to change the parameters via desktop isn't ideal, not fussed about the dataset being changed since it will only be used by the end user and our finance team who will both know to check the parameters on every refresh. The idea is we keep one for scheduled refresh with the current/previous month as described before and a separate one that they can alter to view historical data, only refreshing on demand.
However this makes it easier for our guys in finance to customize the parameters on behalf of our end users at least so it is still helpful to know.
- pawlowski61325 years agoHelper V
Hi Tom, I would argue that I DO NOT want the same dataset for my users as different users have different authorizations to see different data. We should be able to define SQL parameters in a Direct Query (based on USERNAME()) which, today we can't do as far as I know.