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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
powerbiexpert22
Post Prodigy
Post Prodigy

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
Post Prodigy
Post Prodigy

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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