Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
aiyosap
Helper II
Helper II

How to find out if a Monday is the last Monday for the month?

Dear Power BI guru,

 

I am wondering if there is a way todetermine which one in a list of Monday's dates is the last Monday for the month.

 

For example, the following list of date are all Monday, and I want to know which one of them is belong to the last Monday for the month.

1.JPG

 

 

 

 

 

 

 

I cannot find any query function to achieve this, could you help? thank you.

Regards,

Aiyo

 

 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @aiyosap ,

 

Please try the measure.

 

Is_last_Monday = 
VAR diff =
    DATEDIFF ( MAX ( 'Table'[Date] ), EOMONTH ( MAX ( 'Table'[Date] ), 0 ), DAY )
RETURN
    IF ( diff <= 6 && diff >= 0, 1 )

vkkfmsft_0-1653376755331.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-kkf-msft
Community Support
Community Support

Hi @aiyosap ,

 

Please try the measure.

 

Is_last_Monday = 
VAR diff =
    DATEDIFF ( MAX ( 'Table'[Date] ), EOMONTH ( MAX ( 'Table'[Date] ), 0 ), DAY )
RETURN
    IF ( diff <= 6 && diff >= 0, 1 )

vkkfmsft_0-1653376755331.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@aiyosap , for any date last Monday is

 

'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1

 

using Today

Today()+-1*WEEKDAY(Today(),2)+1

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I notice, many times, you have simply provide answer for the sake of gaining the top kudo spot in the forum.

This is not right. please stop. 

Thank You.

 

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors