Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello,
I have a question please,can i set the value of the parameter StartYear or EndYear by a query like,
select Max(SalesYear) from Table. (T-sql,dax,m) no matter the programming language.. if yes how to do it and the table should be imported on power bi or in sql server ?
Thank you
Hi @FZOU ,
You could create a date dimension with CALENDAR() or CALENDARAUTO() function. Then use the following DAX to set parameter in your current DAX formula but not for all DAX.
var _min = MIN('Table'[Date])
var _max = MAX('Table'[Date])
Hi @v-eachen-msft
I already had a DimDate and that's is my question for this dimdate how can i set the start and end date dynamically via parameters or any other solution.
yes, but then it is no longer a parameter. Create a new query that references your fact table. Click on the date column and select earliest from the date menu.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 61 | |
| 54 | |
| 41 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 106 | |
| 99 | |
| 38 | |
| 29 | |
| 28 |