Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Passing a parameter into a dataset from another dataset

I have a dataset that populates a drop down list of employees. Each employee has a name and employeeId. I am attempting to find a way to pass the selected employee's employeeId to another dataset of mine which is a function in Sql Server. I have done it this way so that the dataset itself will not have to filter though too much data. Instead, it should just be populated based off the employeeid that is passed into the function. Is there a way to do this in Power BI that does not require me to use views instead and filter based off of a relationship between the datasets?

 

Thanks!

  • Anonymous you cannot pass slicer value to underline power query but you can add a parameter and use that parameter to filter your sql view, parameter value can be passed to underline query

     

    I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    ⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡

5 Replies

  • Anonymous you cannot pass slicer value to underline power query but you can add a parameter and use that parameter to filter your sql view, parameter value can be passed to underline query

     

    I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    ⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡

    • Anonymous's avatar
      Anonymous
      Not applicable

      So there is no way around using a view in this case? Using a view will require a lot of extra lookups and transactions in my case while a function with a parameter would just return what is necessary for the current employee.

      • parry2k's avatar
        parry2k
        Icon for Super User rankSuper User

        Anonymous you can surely view, not an issue, but to filter the data in the view you need to use parameter. Check this out if it helps.

         

        I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

        ⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡