Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
tmullady
Regular Visitor

date paramaters

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)

1 ACCEPTED SOLUTION
maracles
Resolver II
Resolver II

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.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

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.

maracles
Resolver II
Resolver II

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?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors