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 Maikeru
Try the following as columns
MinDate = CALCULATE( MIN('01-MasterCalendar'[Date]),
FILTER(ALL('01-MasterCalendar'[Date]),'01-MasterCalendar'[Year] =YEAR('01-MasterCalendar'[Date]) ))
MaxDate = CALCULATE( Max('01-MasterCalendar'[Date]),
FILTER(ALL('01-MasterCalendar'[Date]),'01-MasterCalendar'[Year] =YEAR('01-MasterCalendar'[Date]) ))
Replace '01-MasterCalendar' with your calendar table name.
Using these expressions it will generate MIn and Max dates for each year in the calendar table.
If this works for you please accept this as solution and also give KUDOS.
Cheers
CheenuSing