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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Oliya
Frequent Visitor

Need help with the slicer filtering

https://drive.google.com/file/d/1kFf_Q2wl4FEWnABUJNpIX741SOf78iPP/view?usp=share_link

Ths is the sample file. I have a date slicer and a reference date slicers on the basis of which I am calculating change% compared to reference period.
Suppose I have only data of Jan month for 2022 then in the reference period while comparing it with year 2021 they should only see jan in the year 2021 and not all months in the reference slicer. How I can achieve this?

 

Oliya_0-1682022038238.png

 

 

2 REPLIES 2
Oliya
Frequent Visitor

Thanks for the solution. But this not working at Qtr level how I can apply the logic as Qtr level?

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1682024715387.png

 

 

reference date visual filter: =
VAR _selectedyear =
    MAX ( 'Date'[Year] )
VAR _selectedmonth =
    MAX ( 'Date'[MonthNo] )
RETURN
    COUNTROWS (
        FILTER (
            'Reference Date',
            'Reference Date'[Year] = _selectedyear - 1
                && 'Reference Date'[MonthNo] = _selectedmonth
        )
    )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors