Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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

1 ACCEPTED SOLUTION

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-aggregations

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

4 REPLIES 4
Mariusz
Community Champion
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

image.png

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

 

Anonymous
Not 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.

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-aggregations

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.