Forum Discussion
Value from Slicer ( with "Between" Style)
Hello All
In my report , I have a slicer for "Sales Date" in a "between style".
How do I retrieve the "From Date" to "To Date" in to a variable ?
Thanks
- Anonymous2 years ago
Hi, zahirmohideen
You can try amitchandak way. If it does not work, you can try the following DAX.
DAX:startDate = CALCULATE(MIN('Date'[Date]),ALLSELECTED('Date')) endDate = CALCULATE(MAX('Date'[Date]),ALLSELECTED('Date'))Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
2 Replies
- AnonymousNot applicable
Hi, zahirmohideen
You can try amitchandak way. If it does not work, you can try the following DAX.
DAX:startDate = CALCULATE(MIN('Date'[Date]),ALLSELECTED('Date')) endDate = CALCULATE(MAX('Date'[Date]),ALLSELECTED('Date'))Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
- amitchandak
Super User
zahirmohideen , You can use following
Measure =
var _max = maxx(allselected(Date), Date[Date])
var _min = minx(allselected(Date), Date[Date])
return
<Your measure code>