Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Passing filter selected value to paramater

Hi, Gurus!
Sorry if this question was somewhere in forum, but i still didn't find the answer.

 

I have pDate parameter based on Date query values and FactTable that i want to filter by parameter pDate.

 

In Power BI i create two elements:

  • filter based on Date column from query Date
  • table with columns from FactTable

I would like to pass values selected in filter to my paramter pDate instead of selecting Manage Parameters menu and changing the values there.

My task is to reduce the output data from the database query and provide the user with a convenient filtering tool
I'm connected using Direct Query

 

Thanks, Egor

  • Hi Anonymous ,

    You said that you want to use parameter in report, visual or page filter, right? But this is not suppported currently. If you want to use parameter to filter it , you could click "edit parameters" , then change it and apply changes like below

    Or you also could achieve this by in design or DAX level instead of Power Query. You could try to create relationship between date table and fact table, then use date table in slicer , which could also filter data in fact table.

    Best Regards,
    Zoe Zhi

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

4 Replies

  • Mariusz's avatar
    Mariusz
    Community Champion

    Hi Anonymous 

     

    Direct Query includes filter context, so you don't need to pass any parameters.

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    LinkedIn

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Mariusz thank you for feedback! 

      You mean that the query goes to database include filter what i choose on sheet?
      We can't check it because power bi don't have any profiler on his side, in our database side we can't check it too.

      Thanks, Egor

  • dax's avatar
    dax
    Community Support

    Hi Anonymous ,

    You said that you want to use parameter in report, visual or page filter, right? But this is not suppported currently. If you want to use parameter to filter it , you could click "edit parameters" , then change it and apply changes like below

    Or you also could achieve this by in design or DAX level instead of Power Query. You could try to create relationship between date table and fact table, then use date table in slicer , which could also filter data in fact table.

    Best Regards,
    Zoe Zhi

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