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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
svsivaraju
Frequent Visitor

year and moth filter

when we choose the year 2023 in filter and month of july in month filter then the data should apper from jan-june in the visual and other example when we choose the year 2023 in filter and month of april in month filter then the data should apper from jan-march in the visual

1 REPLY 1
Anonymous
Not applicable

Hi @svsivaraju ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

Create a measure.

Measure =
VAR _year =
    SELECTEDVALUE ( 'year'[year] )
VAR _month =
    SELECTEDVALUE ( 'month'[month] )
VAR _tableyear =
    YEAR ( MAX ( 'Table'[date] ) )
VAR _tablemonth =
    MONTH ( MAX ( 'Table'[date] ) )
VAR _re =
    IF (
        _year <> BLANK ()
            && _month = BLANK ()
            && _year = _tableyear,
        1,
        IF (
            _year <> BLANK ()
                && _month <> BLANK ()
                && _year = _tableyear
                && _month > _tablemonth,
            1,
            BLANK ()
        )
    )
RETURN
    _re

vrongtiepmsft_2-1695866471747.png

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.