Forum Discussion

2019Tony's avatar
2019Tony
New Member
7 years ago
Solved

passing URL parameter value to SQL Direct Query

I have the following situation:
The embedded power BI report URL with a filter parameter that depends on user input. it like https: .....&?filter=States/Region eq ‘WEST’.

In the Power BI module connects to the SQL database through Direct Query mode. The SQL Query has a parameter 'RegionName' .
it like ....[Query="SELECT some columns FROM StatesTable WHERE Region = '"&RegionName &"';"

Is it possible to pass the parameter from the URL filter to the SQL Direct Query to get accurate data? How to achieve that?

Any assistance would be valuable.

  • hi, 2019Tony 

    According to my knowledge, I afraid it couldn't be achieved in power bi for now.

    there is an idea about this issue, please vote it up.

     

    Best Regards,

    Lin

2 Replies

  • v-lili6-msft's avatar
    v-lili6-msft
    Icon for Community Support rankCommunity Support

    hi, 2019Tony 

    According to my knowledge, I afraid it couldn't be achieved in power bi for now.

    there is an idea about this issue, please vote it up.

     

    Best Regards,

    Lin

    • 2019Tony's avatar
      2019Tony
      New Member

      Hi Lin,

      Thank you for taking the time on this. I will vote, for sure.

       

      Cheers,

      Ton