Forum Discussion

Shiroe's avatar
Shiroe
Icon for Helper I rankHelper I
4 years ago
Solved

Use power bi parameters in a query through native query

Dear partners, Kindly request your help, I am trying to pass parameters to a query that uses native query, but it does not recognize the parameter of power bi I have tried appending it to the sql ...
  • v-easonf-msft's avatar
    v-easonf-msft
    4 years ago

    Hi, Shiroe 

    You can refer to the solution proposed by kailas684  in this thread.


    Step#1: Create Parameter pID [text parameter and keep default value]

    Step#2: On Dataset that is pulled on Query Editor, right click and go to Advanced Editor. Edit below code as per your database and table name.

    let
        pID=ID,
        Source =
        Oracle.Database("your database name",
        [HierarchicalNavigation=true,
        Query="SELECT * FROM MYtableName#(lf) where DA_LOAN_ID='"&pID&"'"])   
    in
        Source


    Best Regards,
    Community Support Team _ Eason