Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Can someone tell me what Exactly is HASONEFILTER() does in DAX? I know I can search in internet and learn from there which i tried but this function does not seem to be going in my head?
Can anyone explain this DAX f(x) with some demo example.
Regards,
Droid
Solved! Go to Solution.
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
quoting https://msdn.microsoft.com/en-us/query-bi/dax/hasonefilter-function-dax
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 ?
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
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 37 | |
| 31 | |
| 27 |