Forum Discussion
Query referencing another query
- 5 years ago
Hi WaheedAli ,
You can c convert your second query to a funciton (follow the steps in https://radacad.com/custom-functions-made-easy-in-power-bi-desktop)
Then , In your first query with the list of IDs, go to Add Column > Invoke Custom Function, choose the function you just made as the function query, and change the table drop down from text to column name and select the variable column in first query .
For more details, please refer to the similar post :https://community.powerbi.com/t5/Desktop/JSON-query-based-on-another-query/td-p/177461
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
WaheedAli Hey did you check the below links
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/
http://biinsight.com/power-bi-desktop-query-parameters-part-1/
https://www.excelguru.ca/blog/2016/04/28/pass-parameters-to-sql-queries/
- WaheedAli5 years agoHelper I
Dear negi007,
Thanks a lot for guiding me but on the mentioned links, on the first link, it says the below. So I am not sure it will help me or not but thanks a lot for guiding me. I learnt a lot from it, since I am new with Power BI. Thanks
"Currently, only a static list of Accepted Values (or any value of the expected type) are accepted. In future updates, we will enable users to bind the list of Accepted Values for a parameter to the output of another query. This would enable dynamic sets of options to be displayed to the user, maybe even based on their selection for a previous parameter. A typical example for this would be making a “City” parameter change the list of values to select from, based on another parameter that allows users to specify a “State”. Also in a future update, we will enable users to select more than one value from the list of Accepted Values, rather than just one as it is the case in the current product version."