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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Is there any way to set paramaters in powerbi? I would like the users to control date ranges for the query results.
Select* from .....
WHERE [DATE] >= (@BegDate) AND [DATE] <= (@EndDate)
Solved! Go to Solution.
It is difficult to exactly what would fit your solution best but a couple of options come to mind. With both of these options you will need to pin a 'Live Page' to your dashboard rather than simply pin individual charts. Live Pages make the filter tools accessible to the user.
1. Custom Timeline Visualisation.
https://app.powerbi.com/visuals/
The Timeline visualisation at the link above allows users to select a specific timerange and can be set to Years, Quarters, Months or Days
2. Slicer Visualisation
The slicer visualisation comes as standard with Power BI. Simply create slicers for Year, Quarter or Month. Day may be a little too unfriendly to use depending on your time range. The user can then select the combination of Years, Months that suit them.
This is not as useful for linear rangers across multiple years, option 1 is better for that.
This is not really an answer to your question, but we have something similar. We have reports/dashboards we want to always come up and query data for the current month / year. We ended up adding some additional columns to our "date" table for day/month/quarter/year.
We called these date fields "relative dates" that we recalculate each night. For example, we end up with text values of "Today/Yesterday" for days, "This Month/Last Month" for months and This Year and Last Year for years - then we can create a report with a report/page filter and set it for "This Month" - that way whenever the report comes up it is always positioned to the current month.
We are using these relative date filters to provide the the date boundries on the report and then add another date filter so the user can select periods of time within the scope.
It is a bit of a hack, but seems to working fairly good so far.
It is difficult to exactly what would fit your solution best but a couple of options come to mind. With both of these options you will need to pin a 'Live Page' to your dashboard rather than simply pin individual charts. Live Pages make the filter tools accessible to the user.
1. Custom Timeline Visualisation.
https://app.powerbi.com/visuals/
The Timeline visualisation at the link above allows users to select a specific timerange and can be set to Years, Quarters, Months or Days
2. Slicer Visualisation
The slicer visualisation comes as standard with Power BI. Simply create slicers for Year, Quarter or Month. Day may be a little too unfriendly to use depending on your time range. The user can then select the combination of Years, Months that suit them.
This is not as useful for linear rangers across multiple years, option 1 is better for that.
There has got to be a better way to filter on date ranges. Yes, the "Timeline" visualization functions, but it is not a friendly tool. It is a pain to use. Why not simply allow a popup calendar to select a start and end date?
Looks like the time slicer may work. How do I pass the timeslicer dates into my data set query?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 24 |
| User | Count |
|---|---|
| 120 | |
| 93 | |
| 70 | |
| 69 | |
| 66 |