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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Pallavi_m
Helper I
Helper I

MonthYear slicer to be in sync with Year slicer

Hi all,

I have two slicers,

1. Year slicer from Calendar

Table

2.MonthYear slicer from Table B

Year slicer (Calendar table)

Year
2020
2021
2022
2023
2024
2025

 

MonthYear slicer from Table B

MonthYear
Jan2020

Feb2020

Mar2020
Apr2020
May 2020
Jun 2020

Jul2020

Aug2020

Sep2020

Oct2020

Nov2020

Dec2020

Jan2021

Feb2021

 

 

Dec2025

The Calendar table has no relation with table B.

Now when I select Oct 2020, then only 2020 has to be avaialble for selection, rest of the years have to be disabled/disappear.

How do I achieve this?

 

Help is appreciated.

2 ACCEPTED SOLUTIONS
vicky_
Super User
Super User

Honestly, the easiest way is to just create a relationship between the two dates.
Otherwise, if you're selecting one value use SELECTEDVALUE to grab the year / month from the selected table to use as a filter. If  you have multiple, then you can use VALUES and check if the month or year is in that list of values as a filter.

View solution in original post

v-zhangti
Community Support
Community Support

Hi, @Pallavi_m 

 

You can try the following methods.

Year = RIGHT([MonthYear],4)

vzhangti_0-1672970674311.png

Measure = 
IF ( SELECTEDVALUE ( 'Table B'[MonthYear] ) = BLANK (),
    1,
    IF ( SELECTEDVALUE ( 'Table B'[Year] ) = SELECTEDVALUE ( 'Calendar'[Year] ),
        1,
        0
    )
)

Put this measure in the Year Slicer's filter and set it to equal 1.

vzhangti_1-1672970751082.pngvzhangti_2-1672970771786.png

When MonthYear is not selected, Year is displayed in full. When a MonthYear is selected, the corresponding year appears and the other years are hidden.

 

Best Regards,

Community Support Team _Charlotte

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

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Pallavi_m 

 

You can try the following methods.

Year = RIGHT([MonthYear],4)

vzhangti_0-1672970674311.png

Measure = 
IF ( SELECTEDVALUE ( 'Table B'[MonthYear] ) = BLANK (),
    1,
    IF ( SELECTEDVALUE ( 'Table B'[Year] ) = SELECTEDVALUE ( 'Calendar'[Year] ),
        1,
        0
    )
)

Put this measure in the Year Slicer's filter and set it to equal 1.

vzhangti_1-1672970751082.pngvzhangti_2-1672970771786.png

When MonthYear is not selected, Year is displayed in full. When a MonthYear is selected, the corresponding year appears and the other years are hidden.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

vicky_
Super User
Super User

Honestly, the easiest way is to just create a relationship between the two dates.
Otherwise, if you're selecting one value use SELECTEDVALUE to grab the year / month from the selected table to use as a filter. If  you have multiple, then you can use VALUES and check if the month or year is in that list of values as a filter.

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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