Forum Discussion
Query for parameter suggested values (global variable for entire project?)
Hi Anonymous,
You can perform the following steps to populate the parameter list based on a query.
1. Import a table from SQL Server by writing your T-SQL in SQL statement(optional) textbox as shown in the following screenshot.
2. Get a list from the date column in the imported table, you would need to click on the column to select it and then right-click and select “Add as New Query”. Now you have a list named Query 3 whose values are derived from your T-SQL formula.
3.When you create new parameter, you will be able to choose Query 3 as follows.
For more details about how to create query parameter in Power BI Desktop, please review the following blog.
Data-Driven Power BI Desktop Parameters Using List Queries
Thanks,
Lydia Zhang
Thank you bro! it helped me a lot! (y)