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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
sabilahmed
Resolver I
Resolver I

Date FY Slicer to only show Last 3 Years, Current Year and 3 Years in the future

Hi all,

 

I have the slicer below from my Dim_Calendar table:

sabilahmed_0-1659654673985.png

 

As you can see, it is displaying all years because the CALENDARAUTO deature is reading lots of dates across all the data in the model.

 

Is there a way to restrict the slicer so it always shows:

Previous 3 FY

Current FY

Future 3 FY

 

So 7 FY's in total.

 

Thanks,

Sabil

 

1 ACCEPTED SOLUTION
memepu
Resolver II
Resolver II

Hi @sabilahmed ,

Please refer to My steps to see if it helps you.

Create a year column first.

yeat = YEAR('Table'[Date])

 Then create a column put into the slicer.

Column =
VAR _1 =
    YEAR ( TODAY () )
VAR _qian3 = _1 - 3
VAR _hou3 = _1 + 3
RETURN
    IF ( 'Table'[yeat] >= _qian3 && 'Table'[yeat] <= _hou3, 'Table'[yeat], BLANK () )

memepu_0-1660026107533.png

 

Best regards.

 

 

View solution in original post

2 REPLIES 2
memepu
Resolver II
Resolver II

Hi @sabilahmed ,

Please refer to My steps to see if it helps you.

Create a year column first.

yeat = YEAR('Table'[Date])

 Then create a column put into the slicer.

Column =
VAR _1 =
    YEAR ( TODAY () )
VAR _qian3 = _1 - 3
VAR _hou3 = _1 + 3
RETURN
    IF ( 'Table'[yeat] >= _qian3 && 'Table'[yeat] <= _hou3, 'Table'[yeat], BLANK () )

memepu_0-1660026107533.png

 

Best regards.

 

 

amitchandak
Super User
Super User

@sabilahmed , you have to create a flag and use that filter.

Get a year for you FY using start FY date or end FY Date

 

Then create a flag

new column =

Var _max = maxx(filter(Date, date[Date] = today() ) , [FY]) //Here FY is a number

return

if([FY] >= _max -3 && [FY] <= _max+3, 1, 0)

 

refer this for FY start date

https://medium.com/chandakamit/cheat-sheet-calendar-of-any-standard-month-just-one-variable-apart-5e...

 

or

 

Creating Financial Calendar - From Any Month
https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calend...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.