Forum Discussion
HASONEFILTER in DAX??
- 8 years ago
Hi Anonymous
Here 'Filter' are we referring to any type of filter whether it be a visual level filter, page level filter, report level or even a slicer.
Look at my test
add the following measure in a card visual without any filter
filter = IF(HASONEFILTER(Sheet3[stage name]),TRUE(),FALSE())
Then add a visual level filter and select an item
Then add a slicer and select an item
Best Regards
maggie
H Anonymous
Say for example, country table has 2 filters applied, Category table has one filter applied, Sales table has no filter. Then
HASONEFILTER(Country) returns FALSE
HASONEFILTER(Category) returns TRUE
HASONEFILTER(Sales) returns FALSE
Which means , if the table/column has only one filter , then this function returns true. Hope this helps.
Thanks
Raj
Here by 'Filter', are we referring to any type of filter whether it be a visual level filter, page level filter, report level or even a slicer?
Or do we have any other type of filteration ?
- v-juanli-msft8 years agoCommunity Support
Hi Anonymous
Here 'Filter' are we referring to any type of filter whether it be a visual level filter, page level filter, report level or even a slicer.
Look at my test
add the following measure in a card visual without any filter
filter = IF(HASONEFILTER(Sheet3[stage name]),TRUE(),FALSE())
Then add a visual level filter and select an item
Then add a slicer and select an item
Best Regards
maggie