Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
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
Solved! Go to Solution.
Hi @Anonymous ,
This is my test table:
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:
Put the measure into the filter pane:
You can show people with more than 2 traffic violations PER YEAR and not all years.
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.
Hi @Anonymous ,
This is my test table:
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:
Put the measure into the filter pane:
You can show people with more than 2 traffic violations PER YEAR and not all years.
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.
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 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"
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.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 24 | |
| 23 | |
| 17 | |
| 14 | |
| 13 |
| User | Count |
|---|---|
| 63 | |
| 41 | |
| 39 | |
| 39 | |
| 38 |