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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
SevsBo
Resolver III
Resolver III

Check if Date column contains dates that are within last month?

I'm struggling to determine if the Date column has dates within the last month. I have tried the following formulas, but they all omit the 31st of December 2024.

 

Option1:

IF(
    'Date'[CreatedDate] >= DATE(YEAR(TODAY()), MONTH(TODAY()) - 1, 1) &&
    'Date'[CreatedDate] <= EOMONTH(TODAY(), -1),
    TRUE,
    FALSE
)
 
Option2:
IF(
    'Date'[CreatedDate] >= DATE(YEAR(TODAY()), MONTH(TODAY()) - 1, 1) &&
    'Date'[CreatedDate] <= EOMONTH(DATE(YEAR(TODAY()), MONTH(TODAY()) - 1, 1), 0),
    TRUE,
    FALSE
)
 
Option 3:
IF(
    'Date'[CreatedDate] >= EOMONTH(TODAY(), -2) + 1 &&
    'Date'[CreatedDate] <= EOMONTH(TODAY(), -1),
    TRUE(), FALSE()
)
1 ACCEPTED SOLUTION
SevsBo
Resolver III
Resolver III

Found the solution, posting here in case anyone has the same issue:

 

My CreatedDate column was formatted as DATETIME, so I first had to convert it to DATE:

CreatedDateV2 =
DATE(
    YEAR(' Date'[CreatedDate]),
    MONTH('Date'[CreatedDate]),
    DAY('Date'[CreatedDate])
)
 
Then I used this V2 version with the following formula:
 
IF(
    'Date'[CreatedDateV2] >= EOMONTH(TODAY(), -2) + 1 &&
    'Date'[CreatedDateV2] <= EOMONTH(TODAY(), -1),
    TRUE(), FALSE()
)
 
Works perfectly!

View solution in original post

2 REPLIES 2
SevsBo
Resolver III
Resolver III

Found the solution, posting here in case anyone has the same issue:

 

My CreatedDate column was formatted as DATETIME, so I first had to convert it to DATE:

CreatedDateV2 =
DATE(
    YEAR(' Date'[CreatedDate]),
    MONTH('Date'[CreatedDate]),
    DAY('Date'[CreatedDate])
)
 
Then I used this V2 version with the following formula:
 
IF(
    'Date'[CreatedDateV2] >= EOMONTH(TODAY(), -2) + 1 &&
    'Date'[CreatedDateV2] <= EOMONTH(TODAY(), -1),
    TRUE(), FALSE()
)
 
Works perfectly!
Anonymous
Not applicable

Hi @SevsBo 

 

Glad to hear you solved the problem yourself! Thank you for sharing!

 

Best Regards,
Yulia Xu

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors