Forum Discussion
Passing Parameters to Query Editor from another table
- 9 years ago
aellison One of the new feature for query parameters is to be able to use other queries as a source for it. So you can create two new queries that gives max and min values and set that as a source for your parameters and then use those parameters to filter DateDim table.
Hi aellison,
As ankitpatira suggested, you can specify the query parameter values from other list query output. In your scenario, you can create two list query which returns both MIN and MAX of the OrderDateKey. Refer to below:
1. In Query Editor, check the OrderDateKey column then select "As a New Query".
2. In the new query, check Sort Descending. Then use "Keep Top Items" to only keep the MAX value. Use the same way to get a list which contains the Min value.
3. Create two query parameters, one bind to the output of MAX value, the other binds to the output of the Min value.
4. Use these two query parameters to filter data.
Reference:
Data-Driven Power BI Desktop Parameters Using List Queries
Best Regards,
Qiuyun Yu