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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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