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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
pjr1221
Frequent Visitor

Dynamic parameter invoke by slicer

Hi all,

I'm having difficulties with stored procedure paramter in Power Bi.

Importing stored procedures with dynamic parameters was successful yesterday.

I referred to this content :

Execute SQL Server Stored Procedure With User Parameter In Power BI

 

parameter.PNG

let
    SQLSource = (vStartDate as text , vEndDate as text, v_Brand as text) => 
let
    Source = MySQL.Database("MyServer", "test", [ReturnSingleDatabase=true, Query="call P_DC_REPORT_REPURCHASE_COUNT "& "("& "'"& vStartDate &"'"&","&"'"&vEndDate&"'"&",'"&v_Brand & "'" & ")" & ";"])
in
    Source
in
    SQLSource

The problem is that the table imported by stored procedure does not contain a date.

Maybe it's becacuse of SQL function GROUP BY (The developer knows the details.). I want to insert the parameter as a slicer in the report and execute INVOKE, overwrite the existing table. Is it possible? I haven't found the relevant references yet.

 

In conclusion,  I want the user send the parameter value to the stored procedure by slicer. And I want to overwrite the data on the existing table, not the new table. I wonder if this is possible, and even after publishing on the web.

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@pjr1221 ,

 

"I want the user send the parameter value to the stored procedure by slicer. And I want to overwrite the data on the existing table, not the new table. I wonder if this is possible, and even after publishing on the web."

 

<--- I'm afraid the query parameter can't interact with the selected item in slicer. In addtion, if you want to replace the existing table, you need to modify the data source expression in advanced editor.

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

@pjr1221 ,

 

"I want the user send the parameter value to the stored procedure by slicer. And I want to overwrite the data on the existing table, not the new table. I wonder if this is possible, and even after publishing on the web."

 

<--- I'm afraid the query parameter can't interact with the selected item in slicer. In addtion, if you want to replace the existing table, you need to modify the data source expression in advanced editor.

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yuta-msft Hi, 

If that's not possible, why is Stored Procedure used in Power BI ?

 

Best Reguards,

pjr1221

@pjr1221 ,

 

I would suggest you to refer to doc below:

https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

That article is from 2016.  Have there been no updates to improve the end user experience since then? 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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