cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

## Last Mon, Tue, Wed, Thu, Fri, Sat and Sun of the Month in DAX

Use Case which gave formulas for language M. Same formulas are given here for DAX language. There are many business scenarios where you would be asked to find last Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday of the Month.
For example, monthly labour hours report will be published on last Wednesday of the month .  Hence, if a date is given, following should be the answer

Solution -  Following DAX formulas can be used to calculate these dates

``````Last Monday of the Month
= CEILING(EOMONTH([Date],0)-8,7)+2

Last Tuesdday of the Month
= CEILING(EOMONTH([Date],0)-9,7)+3

Last Wednesday of the Month
= CEILING(EOMONTH([Date],0)-10,7)+4

Last Thursday of the Month
= CEILING(EOMONTH([Date],0)-11,7)+5

Last Friday of the Month
= CEILING(EOMONTH([Date],0)-12,7)+6

Last Saturday of the Month
= CEILING(EOMONTH([Date],0)-13,7)+7

Last Sunday of the Month
= CEILING(EOMONTH([Date],0)-14,7)+8``````