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
DNAE
New Member

Return rows whose date are in the future based on current month

Hello,

 

I have a table that contains data for different items that have expiration dates.

I would like to be able to filter the table and show rows whose expiration dates are x months into the future.

 

So, for example, if I'm looking at the table now (in May 2023), I would like to see only rows with expiration dates 3 months into the future (the entirety of August 2023).

If I'm looking at the table in October 2023, I would like to see only rows with expiration dates 5 months into the future (the entirety of March 2024).

 

Only the month should be taken into consideration.

 

The table looks like this:

Screenshot 2023-05-11 151911.png

Any help would be greatly appreciated!

1 ACCEPTED SOLUTION
eliasayyy
Memorable Member
Memorable Member

annonymous1999_0-1683809711231.png

for caluclated column 

Near Expiry = 
IF(
    MONTH(TODAY()) + 3 >= MONTH('Table'[Expiry Date]),
    "Yes",
    "No"
)


for measure

Near Expiry Measure = 
IF(
    MONTH(TODAY()) + 3 >= MONTH(MAX('Table'[Expiry Date])),
    "Yes",
    "No"
)

 

annonymous1999_1-1683809800007.png

 

View solution in original post

1 REPLY 1
eliasayyy
Memorable Member
Memorable Member

annonymous1999_0-1683809711231.png

for caluclated column 

Near Expiry = 
IF(
    MONTH(TODAY()) + 3 >= MONTH('Table'[Expiry Date]),
    "Yes",
    "No"
)


for measure

Near Expiry Measure = 
IF(
    MONTH(TODAY()) + 3 >= MONTH(MAX('Table'[Expiry Date])),
    "Yes",
    "No"
)

 

annonymous1999_1-1683809800007.png

 

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.