Forum Discussion
Sander1401
Helper II
2 years agoLast Sunday in dataset
Hi all, is there a way to calculate (DAX) the last Sunday of the dataset? for example if the max date in the dataset is Monday 15-04-2024, I would like the date 14-04-2024. If the max date is 14-04...
- 2 years ago
you need to create a column in the calendar table
ahoggatt42
2 years agoRegular Visitor
Have you tried a measure:
Test = CALCULATE(LASTDATE(*Date*),WEEKDAY(*Date*,1)=1)
- Sander14012 years ago
Helper II
I will definitely try this one, thanks.
my own solution (not tested yet) is:
If (weekday(Max date, 2) = 7, max date, max date - weekday(Max date, 2))but yours looks more clear.