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

Get certified as a Fabric Data Engineer: Check your eligibility for a 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700. Get started

Reply
micjensen
Frequent Visitor

Create a Next 12 month filter/Slicer function

Dear Community

I'm currently struggling on how to create a date filter that consist of the next year, where starting point should be todays date. I do already have a full functional calendar with all the dates from 2021 to 2031. What i now need, is a way tidentify all the dates that are equal tothe next 1 year including todays date ?

Does this make sense - i really can't figure out how to do it, i only manage to find help in regards to the previous 12 months.

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

You can obiviously use relatiive date filtering, but I guess this is not what you are looking for.

ValtteriN_0-1639401393706.png

Here is one way to get a filter column:
1. Add today to your calendar

 

Today = TODAY()

2. create helper table
Dates Next 12Months =
var _sdate = MAX('Calendar'[Today])
var _edate = DATEADD('Calendar'[Today],12,MONTH) return
DATESBETWEEN('Calendar'[Date],_sdate,_edate)
3. Create relationship and the following column
Filter column = IF(RELATED('Dates Next 12Months'[Date])<>BLANK(),1,0)

I hope this helps to solve your issue and if it does consider accepting this as a solution!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ValtteriN
Super User
Super User

Hi,

You can obiviously use relatiive date filtering, but I guess this is not what you are looking for.

ValtteriN_0-1639401393706.png

Here is one way to get a filter column:
1. Add today to your calendar

 

Today = TODAY()

2. create helper table
Dates Next 12Months =
var _sdate = MAX('Calendar'[Today])
var _edate = DATEADD('Calendar'[Today],12,MONTH) return
DATESBETWEEN('Calendar'[Date],_sdate,_edate)
3. Create relationship and the following column
Filter column = IF(RELATED('Dates Next 12Months'[Date])<>BLANK(),1,0)

I hope this helps to solve your issue and if it does consider accepting this as a solution!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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