Forum Discussion
Remove filter not removing a drop-down slicer
Thank you Anonymous - I'm trying this now. After lots of time trying to debug it, I noticed that the count which is mean to be unfiltered by project, removes all cases where the closed date is not blank. I'll be trying your file / solution now as well.
I did a table to debug. The DAX below is the closest I can get the results, but weirdly, it removes the filters where the closed date is not blank unless it's the project selected.
So I selected on my slice project ID 151, I get all the count for the project ID 151 PLUS all the count for the cases where the closed date is blank. That's why the number is higher than the selected, but still not what it should be without any filter.
I try to give an example below. Thank you so much!!
Without filter:
Gender - Count1 - Count2 (remove filter)
Not say - 4 - 4
With filter project ID = 151
Gender - Count1 - Count2 (remove filter)
Not say - 0 - 2 (it should be 4)
I checked the columns with higher numbers (eg: female) and it's the same issue. No idea why. Adding the allselected, brings lots of unfiltered records even with genders that aren't on the original table.
Count1 formula:
CountClient inc blank = CALCULATE(DISTINCTCOUNT('cases'[Client_ID]),union(filter(all(CloseDateTable),CloseDateTable[Date]=blank()),CloseDateTable))
Count2 formula - the ones that shouldn't be filtered, but it's getting filtered by the date closed not blank:
CountClient inc blank2 =
CALCULATE(
DISTINCTCOUNT('cases'[Client_ID]),
UNION(
FILTER(ALL(CloseDateTable), CloseDateTable[Date] = BLANK()),
CloseDateTable
),
REMOVEFILTERS ('projects'),
REMOVEFILTERS ('cases'[Project_ID] ),
REMOVEFILTERS('projects_clients'[Project_ID]))