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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Filtering Out Values Per Year

Hello,  

 

I'm having issue where my filer is filtering out values for all years and not per year. For example, if I have a list of 10 people with traffic violations between 2010 to 2020. How do I make the graph only show people with more than 2 traffic violations PER YEAR and not all years? 

 

Thank you

1 ACCEPTED SOLUTION
v-yadongf-msft
Community Support
Community Support

Hi @Anonymous ,

 

This is my test table:

vyadongfmsft_0-1669283215857.png

 

Create a measure:

Count of violation = 
CALCULATE (
    COUNT ( 'Table'[Name] ),
    FILTER (
        ALLEXCEPT ( 'Table', 'Table'[Year] ),
        'Table'[Name] = SELECTEDVALUE ( 'Table'[Name] )
            && 'Table'[Violation] = "Yes"
    )
)

 

Create a slicer from [Year] column and create a table visual:

vyadongfmsft_1-1669283346341.png

 

Put the measure into the filter pane:

vyadongfmsft_2-1669283380825.png

 

You can show people with more than 2 traffic violations PER YEAR and not all years.

vyadongfmsft_3-1669283417666.png

Best regards,

Yadong Fang

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

3 REPLIES 3
v-yadongf-msft
Community Support
Community Support

Hi @Anonymous ,

 

This is my test table:

vyadongfmsft_0-1669283215857.png

 

Create a measure:

Count of violation = 
CALCULATE (
    COUNT ( 'Table'[Name] ),
    FILTER (
        ALLEXCEPT ( 'Table', 'Table'[Year] ),
        'Table'[Name] = SELECTEDVALUE ( 'Table'[Name] )
            && 'Table'[Violation] = "Yes"
    )
)

 

Create a slicer from [Year] column and create a table visual:

vyadongfmsft_1-1669283346341.png

 

Put the measure into the filter pane:

vyadongfmsft_2-1669283380825.png

 

You can show people with more than 2 traffic violations PER YEAR and not all years.

vyadongfmsft_3-1669283417666.png

Best regards,

Yadong Fang

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

Thiago_Melo
Frequent Visitor

First you have to create an graph (i recommend bar graph) with the years in the X axis (you need an column with all the years on the table), in the Y axis you can use the filter functionImage from microsoft supportImage from microsoft support

 

 

 

 

 

 

 

 

 

 

 

Select the column (wich i suppose in your example would be the number of traffic violations by person) then filter with "GREATER THAN" and below "2" 

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.JPG

Anonymous
Not applicable

Hello! thank you for commenting on my post. I tried doing what you explained but nothing really fixed issue. The graph is still showing me vlaues with less than 2 because the filter is being applied to all years and not one yer. If I select a single year, the graph still shows me people with less than 2 violations, even though these people didn't have any violations on the selected year.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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