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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
NatashaSchuster
Helper II
Helper II

FILTERS Function with "S"

Hello,

Does anyone have an example of what exactly FILTERS() does ?

Unfortunately, little details on MSDN on this function. 

https://msdn.microsoft.com/en-us/library/gg492172.aspx

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @NatashaSchuster

 

FILTERS ( MyTable[MyColumn] ) returns a single column of values representing the filters that are applied directly to MyTable[MyColumn] in the current filter context.

 

For example, if you have applied report/page/visual filters directly on the column MyTable[MyColumn], or added any other filters through slicers or rows/columns etc of a visual, the filtered values of MyTable[MyColumn] will be returned by FILTERS.

 

But if you have filtered another column that cross-filters MyTable[MyColumn], this does not impact the values returned by FILTERS ( MyTable[MyColumn] ), though it would impact VALUES ( MyTable[MyColumn] ).

 

Also, any filters added using the CALCULATE/CALCULATETABLE will impact the result of FILTERS.

 

If no filters at all have been applied to the column, you will get the same result as ALL ( MyTable[MyColumn] ).

 

As far as I can tell,

FILTERS ( MyTable[MyColumn] )

is equivalent to

CALCULATETABLE (
    VALUES ( MyTable[MyColumn] ),
    ALLEXCEPT ( MyTable, MyTable[MyColumn] )
)

Regards,

Owen 🙂


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

1 REPLY 1
OwenAuger
Super User
Super User

Hi @NatashaSchuster

 

FILTERS ( MyTable[MyColumn] ) returns a single column of values representing the filters that are applied directly to MyTable[MyColumn] in the current filter context.

 

For example, if you have applied report/page/visual filters directly on the column MyTable[MyColumn], or added any other filters through slicers or rows/columns etc of a visual, the filtered values of MyTable[MyColumn] will be returned by FILTERS.

 

But if you have filtered another column that cross-filters MyTable[MyColumn], this does not impact the values returned by FILTERS ( MyTable[MyColumn] ), though it would impact VALUES ( MyTable[MyColumn] ).

 

Also, any filters added using the CALCULATE/CALCULATETABLE will impact the result of FILTERS.

 

If no filters at all have been applied to the column, you will get the same result as ALL ( MyTable[MyColumn] ).

 

As far as I can tell,

FILTERS ( MyTable[MyColumn] )

is equivalent to

CALCULATETABLE (
    VALUES ( MyTable[MyColumn] ),
    ALLEXCEPT ( MyTable, MyTable[MyColumn] )
)

Regards,

Owen 🙂


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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