Forum Discussion

pjr1221's avatar
pjr1221
Frequent Visitor
7 years ago
Solved

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

 

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.

 

  • 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.

4 Replies

  • v-yuta-msft's avatar
    v-yuta-msft
    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.