Forum Discussion
Calculating Min/Max date columns based on selected values
- 7 years ago
Hi,
You have to write measures, not calculated column formulas. Delete all column from the Calendar Table except the Date column. Write these measures
Minimum date = CALCULATE(MIN('Calendar'[Date]),ALLSELECTED('Calendar'[Date]))
Maximum date = CALCULATE(MAX('Calendar'[Date]),ALLSELECTED('Calendar'[Date]))
Hope this helps.
Hi,
You have to write measures, not calculated column formulas. Delete all column from the Calendar Table except the Date column. Write these measures
Minimum date = CALCULATE(MIN('Calendar'[Date]),ALLSELECTED('Calendar'[Date]))
Maximum date = CALCULATE(MAX('Calendar'[Date]),ALLSELECTED('Calendar'[Date]))
Hope this helps.
- Maikeru7 years agoHelper II
Thank you Ashish_Mathur!
That's exactly what I was looking for!- Ashish_Mathur7 years agoSuper User
You are welcome.
- kcpelesa15 years agoNew Member
Hi Ashish_Mathur , is it possible have this as a column?
im saying this because im using a Matrix table so it doesnt allow measures in the rows.
- Ashish_Mathur5 years agoSuper User
Hi,
Switch to a matrix visual and in the formatting pane, under the Values group, turn on Show on rows.
- KShro2 years agoNew Member
Hi,
What are the min and max date codes doing and when to use it?
Appreciate your explanation.
- Ashish_Mathur2 years agoSuper User
Hi,
It fetches the first and last date selected in the slicer.
- KShro2 years agoNew Member
What I meant to understand is what the ALLSELECTED doing inside the CALCULATE function.
Is it always good to use ALLSELECTED while working with dates?