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
CloudMonkey
Post Prodigy
Post Prodigy

Letting user set date variable for calculated measures

Hi,

 

Please can you tell me how to allow a user to set a date variable (on a report page) which will then be used by a calculated measure?

 

I tried clicking on "New Parameter" expecting to see an option to enter a date but there doesn't appear to be such an option?:

 

parameter date.JPG

 

Thanks,

 

CM

1 ACCEPTED SOLUTION
7 REPLIES 7
JoyCornerstone
Resolver II
Resolver II

I use a slicer for dates and allow them to pick a single date or a date range. That value then becomes the selected value for the measure.  

Hi @JoyCornerstone, thanks - is that a normal slicer or a parameter slicer? How did you set the data type to "date"?

A normal slicer.  In your data model, you should have a Calendar table that contains a date range for the set of dates in your system.  If you don't have that, you'll need to go search for how to set that up and connect it to your underlying table.

Thanks @JoyCornerstone , sorry but how do you get the selected value into a parameter/measure? If I create a slicer doesn't that just filter the underlying tables?

Fantastic, thank you Smiley Happy

CloudMonkey
Post Prodigy
Post Prodigy

I found a workaround. Just set the parameter up as a whole number, then find the parameter's field in the list of data tables and change the data type to date. That seems to change the parameter slicer to accept dates.

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