cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Infecting91
Regular Visitor

Remove filters from all tables but one specific table

Hello,

 

I've been trying to calculate a total of a table ignoring all filters but the ones associates with the table "Ciclos".

I achieved my objective using the following:

 

CALCULATE(Pagos[Ventas],REMOVEFILTERS(Programa),REMOVEFILTERS(Source),REMOVEFILTERS(AdGroup),REMOVEFILTERS(AnuncioKW),REMOVEFILTERS(Medium),REMOVEFILTERS(Paises),REMOVEFILTERS('Lead'),REMOVEFILTERS(Persona),REMOVEFILTERS('Estado Lead'),REMOVEFILTERS('Status Lead'),REMOVEFILTERS('Asesor Retención'),REMOVEFILTERS('Asesor Ventas'),REMOVEFILTERS('Tipo Estudiante Income'),REMOVEFILTERS('Tipo Estudiante Outcome'),REMOVEFILTERS('Tipo Pago'),REMOVEFILTERS('Generación'), REMOVEFILTERS(Materia),REMOVEFILTERS('Forma Pago'),REMOVEFILTERS(Canal),REMOVEFILTERS('Campaña'))

 

However I think its inefficient. Anyone knows another elegant solution?

 

Thanks

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Infecting91 

Basically you can use KEEPFILTERS and REMOVEFILTERS to control tables filters. 

Measure = CALCULATE(MAX([Column1]),KEEPFILTERS('Table'),REMOVEFILTERS())

 

KEEPFILTERS function (DAX) - DAX | Microsoft Docs

REMOVEFILTERS function (DAX) - DAX | Microsoft Docs

 
 
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@Infecting91 

Basically you can use KEEPFILTERS and REMOVEFILTERS to control tables filters. 

Measure = CALCULATE(MAX([Column1]),KEEPFILTERS('Table'),REMOVEFILTERS())

 

KEEPFILTERS function (DAX) - DAX | Microsoft Docs

REMOVEFILTERS function (DAX) - DAX | Microsoft Docs

 
 
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

Fowmy
Super User
Super User

@Infecting91 

You can use REMOVEFILTERS() without parameters to remove all filters then add the table as an argument tot CALCUALTE to push the filter. 

Measure =
CALCULATE (
    Pagos[Ventas],
    Ciclos,
    REMOVEFILTERS ()
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!