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,
im trying to assign start and end date value to a sql Declare stament.
I know i can do a slicer or a datarange filter but there is more complixed items to the query
does anyone know if this is possiable? below is a basic statment i testing with.
Thank you
Declare @startDate date = ?
Declare @endDate date = ?
Select
Count(SO_ID)
from Sales
where ORDER_DATE between @startDate and @endDate
@agonciulea2 , You have to use m parameters or dynamic M parameters
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters
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 |
|---|---|
| 53 | |
| 51 | |
| 36 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 92 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |