Forum Discussion
How to get value from date slicer
- Anonymous8 years ago
Hi Rahulsingh,
Use this formula:
Date_Selected = CALCULATE(MAX(Date_Table[DateRec]);ALLSELECTED(Date_Table))
Regards.
Hi There,
I have written the same formula to get the min & max value from the date slicer but for some reason it's not working for me.
Here is the formula to get slicer start & end date
startDate = CALCULATE(MIN('CASE_DEFLECTION_ANALYSIS'[SYS_CREATED_ON].[Date]), ALLSELECTED('CASE_DEFLECTION_ANALYSIS'))
endDate = CALCULATE(MAX(CASE_DEFLECTION_ANALYSIS[SYS_CREATED_ON].[Date]), ALLSELECTED(CASE_DEFLECTION_ANALYSIS))
Is there something I need to do in the desktop settings?
Try Removing .[Date] and it should work.
Updated DAX
startDate = CALCULATE(MIN('CASE_DEFLECTION_ANALYSIS'[SYS_CREATED_ON]), ALLSELECTED('CASE_DEFLECTION_ANALYSIS'))
endDate = CALCULATE(MAX(CASE_DEFLECTION_ANALYSIS[SYS_CREATED_ON]), ALLSELECTED(CASE_DEFLECTION_ANALYSIS))
Please give a Thumbs-up if it worked