Forum Discussion
Stumped, cannot get min date
- 19 days ago
SOLVED
This is really crazy to me, so I would love an explanation from someone.
Data is such that a value for study_seq will always have the same value for title-id and vice-versa. I changed my formula to use title-ID which DOES appear in the table instead of study_seq. I now get the correct response.Someone, Ritaf1983 ? maruthisp ? please explain this too me.
Hi jjustjjo,
Can you try below steps:
1. Create the minimum date measure
If STUDY_SEQ identifies the study/group for which you want the earliest completed date, create this measure:
Min Study Level Completed Date = CALCULATE ( MIN ( 'Milestones Info'[StudyLevel Completed Date] ), ALLEXCEPT ( 'Milestones Info', 'Milestones Info'[STUDY_SEQ] ) )
This is a measure, not a calculated column.
ALLEXCEPT removes the filters coming from the other columns in Milestones Info, including the current row's completed date, while keeping the current STUDY_SEQ filter.
So for every row belonging to the same STUDY_SEQ, you should now get the same earliest date.
2. If you only want the year
Once the minimum date is working, you can return only the year:
Min Study Level Completed Year = VAR MinCompletedDate = CALCULATE ( MIN ( 'Milestones Info'[StudyLevel Completed Date] ), ALLEXCEPT ( 'Milestones Info', 'Milestones Info'[STUDY_SEQ] ) ) RETURN YEAR ( MinCompletedDate )
Best Regards,
Maruthi
LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/
X - Maruthi Siva Prasad - (@MaruthiSP) / X