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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
powerbiexpert22
Impactful Individual
Impactful Individual

Keepfilter use case

I have gone through below and understood what Keepfilter does however I am not sure what is the use case of Keepfilter, in which scenario we should use keepfilter function

 

https://www.youtube.com/watch?v=M-a7sgpHaFE&pp=ygUKa2VlcGZpbHRlcg%3D%3D

 

 

1 ACCEPTED SOLUTION
SamWiseOwl
Super User
Super User

Hi @powerbiexpert22 

A very basic example here, lets say I want to show all Non lockdown years.

So I apply a filter says DO NOT return 2020 and 2021 data.

The issue is DAX removes the existing year filters and then applies my NOT filter.

Each column is returning the TOTAL of all years NOT 2020, 2021.

SamWiseOwl_0-1736851375214.png

 

Clearly what I meant was, keep the original year filters and don't show data for 2020 and 2021.
So I tell it to keep the table to keep the original filters.

SamWiseOwl_1-1736851506301.png

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

2 REPLIES 2
powerbiexpert22
Impactful Individual
Impactful Individual

Thanks a lot @SamWiseOwl 

SamWiseOwl
Super User
Super User

Hi @powerbiexpert22 

A very basic example here, lets say I want to show all Non lockdown years.

So I apply a filter says DO NOT return 2020 and 2021 data.

The issue is DAX removes the existing year filters and then applies my NOT filter.

Each column is returning the TOTAL of all years NOT 2020, 2021.

SamWiseOwl_0-1736851375214.png

 

Clearly what I meant was, keep the original year filters and don't show data for 2020 and 2021.
So I tell it to keep the table to keep the original filters.

SamWiseOwl_1-1736851506301.png

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.