Forum Discussion
anandav
6 years agoSkilled Sharer
Help with ALL function
Hi Experts, I have the following measure: Customer subset = Var vAG = DISTINCT( SELECTCOLUMNS(FILTER(ALL(Sales), MONTH(Sales[Sale Date]) IN ALLSELECTED('Analysis Group Calendar'[Month])), ...
- 6 years ago
Hi anandav
I create a measure which show the same result as your Customer subset measure when there is no relationship among tables.
Measure = CALCULATE ( DISTINCTCOUNT ( sales[sale cust] ), FILTER ( ALL ( sales ), sales[sale date] <= MAX ( 'filter date table'[Date] ) && sales[sale date] >= MIN ( 'filter date table'[Date] ) ) )Also this measure won't change with the slicer from "calendar[date]".
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PaulDBrown
6 years agoCommunity Champion
Not too sure, but I believe the new REMOVEFILTERS can remove all filters: REMOVEFILTERS ().
anandav
6 years agoSkilled Sharer
Thanks for the suggestion. But FILTER doesn't accept REMOVEFILTERS()
From DAX.guide:
REMOVEFILTERS is an alias for ALL, but it can be used only as a CALCULATE modifier and not as a table expression like ALL
- amitchandak6 years agoSuper User
Can it be done calculate by using cross filter or cross join
CALCULATE(DISTINCTCOUNT(Sales[Sale Cust]), vAG,crossfilter(<>,<>,none))
- anandav6 years agoSkilled Sharer
That doesn't work.
I need a way to remove filters in Sales and Calendar table in the SelectCOlimns statement.