Forum Discussion
Rahulsingh
8 years agoHelper I
How to get value from date slicer
Hi Everyone, I am trying to get the date out of this slicer to use it in a formula. How can I get 3/31/2018 from a slicer in order to pass it to the calculated column? Any help would be greatl...
- Anonymous8 years ago
Hi Rahulsingh,
Use this formula:
Date_Selected = CALCULATE(MAX(Date_Table[DateRec]);ALLSELECTED(Date_Table))
Regards.
Anonymous
8 years agoNot applicable
Hi Rahulsingh,
Use this formula:
Date_Selected = CALCULATE(MAX(Date_Table[DateRec]);ALLSELECTED(Date_Table))
Regards.
Anonymous
7 years agoNot applicable
Anonymous wrote:Hi Rahulsingh,
Use this formula:
Date_Selected = CALCULATE(MAX(Date_Table[DateRec]);ALLSELECTED(Date_Table))
Regards.
This is pretty close but doesn't completely work.
Example: If you have a from and through date of 10/1/2018 to 12/31/2018 but you only have data that goes up to 12/15/2018, this will result in the max date being 12/15/2018 not 12/31/2018. If you wanted to use 12/31/2018 in a calcluation you couldn't.
Is there any way to just grab the date a user enters and use that date in another calculation, regardless of the data set that is returned?
- Ashish_Mathur7 years agoSuper User
Hi,
Assuming the Date slicer is built from a Calendar Table, try this measure
=Max(Calendar[Date])
Hope this helps.
- NKotak_Leecare4 years agoHelper III
Thank you Ashish_Mathur ! It worked well.
- Ashish_Mathur4 years agoSuper User
You are welcome.