Forum Discussion

PowerrrBrrr's avatar
PowerrrBrrr
Helper III
4 years ago

Create parameter for different columns and get value from different columns

How can we pass parameter values from a different column but in the query I pass values from another corresponding value in another column and do calculation. So for ex: I have two columns Id and Name. I crreate a list of Ids and create a parameter for it. Now when I select Id , I would like the value in the Name column for that corresponding ID to be passed in my Power Query. Is it possible?? How??

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi PowerrrBrrr 

    Not sure I completely understood your issue. But I think in Power Query you just have to merge the two queries by the id and then expand the column you want and finally do your calculation. In Power Query to do calculations you need to have the data in the same query.

    Please accept it as a solution if it solved your issue

    • PowerrrBrrr's avatar
      PowerrrBrrr
      Helper III

      Not sure I understand your solution but thats maybe you didnt get my question. So here I go again:

      I have a table with something like this:

      Idnamevalue
      1aaaohcsjachacaxalkcjalkjcxax
      2wwwsackljdadmcmansciajcackjhacs

       

      And I have a Parameter where the Parameters are defined on the as Query type with Ids from above table. So when I open my file I get parameter to select the "Id" from a drop down and based on Id value the report gets filtered. And I also have a power Query in my model which needs [Value] column to be passed. And Now Thats my question that how can I send the [Value] to my power query based on the Id selected as a parameter.