cancel
Showing results for 
Search instead for 
Did you mean: 
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.

View solution in original post

@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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.