Forum Discussion
Slicer Selections to T-SQL Query
Hi All,
Is there anyway to pass a selected value from a slicer to a T-SQL query or a T-SQL Stored Procedure? You can do it with Parameters but that requires opening power query every time and then changing parameter I can't ask the users to do that.
Thanks
Hi Anonymous
You can always use Composite Models Aggregations, this is a mixed model and should improve the overall experience.
https://docs.microsoft.com/en-us/power-bi/desktop-aggregationsBest Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
4 Replies
- amitchandak
Super User
I doubt that from visualization. Refer these
https://community.powerbi.com/t5/Power-Query/parameters-to-SP-or-Sql-query/td-p/57734
You are running in Import Mode?
- Mariusz
Community Champion
Hi Anonymous
It's not possible to use slicers to pass parameters to SQL as slicers work on a model that is already loaded into memory.
If your model is too big then you can switch to direct quey mode, else just load whole data into the model and use slicers.
btw, you don't need open Power Query to adjust parameters, you can just expand Transform data and edit parameter from the report view
Please watch the video for the ref
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn- AnonymousNot applicable
Thanks for the reply, yeah I realise that you can use the manage parameters button as well. But unfortunately that's not what the client is asking for.
I will have to use direct query and put up the lack of performance, i have over a billion rows in the table so unpractical to use import mode.
- Mariusz
Community Champion
Hi Anonymous
You can always use Composite Models Aggregations, this is a mixed model and should improve the overall experience.
https://docs.microsoft.com/en-us/power-bi/desktop-aggregationsBest Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn