Showing results for 
Search instead for 
Did you mean: 
soldous Frequent Visitor
Frequent Visitor

Measure based on dynamic date range from two dropdown slicers

Greetings DAX masters,


I have an issue which I don't know how to solve. I need to create a measure which will calculate sum of volume between two dates. But these dates I need to be dynamic based on two dropdown slicers: start date, end date. 


Is it possible? Could you please help with some general syntax to solve this?

Thanks in advance


tsantandreu Member

Re: Measure based on dynamic date range from two dropdown slicers


 My recommendation will be to have two calendar tables which do not have an active relationship to your start schema



Add a Slicer using Calendar1

Add another Slicer using Calendar2


Here is the calculated measure

calculated measure =

var _StartDate = max(Calendar1[Date])

var _EndDate = max(calendar2[Date])

return calculate(sum(dax expression), DATESBETWEEN(Calendar[DateKey], _StartDate , _EndDate  ))


Please let me know if this help


Helpful resources

New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)