Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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-2024, then I would also like 14-04-2024.
Sander
Solved! Go to Solution.
you need to create a column in the calendar table
Simple enough,
But bear in mind, this measure is single-purposed and used only by itself.
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
you need to create a column in the calendar table
Have you tried a measure:
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 127 | |
| 88 | |
| 78 | |
| 66 | |
| 65 |