Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Use Case - I published Last Mon, Tue, Wed, Thu, Fri, Sat and Sun of the Month in Power Query Language M
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
You can download sample pbix file from https://1drv.ms/u/s!Akd5y6ruJhvhugJllN-eFyxRlIJI?e=01Wdf2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.