Forum Discussion
Help with ALL function
Hi Experts,
I have the following measure:
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.
7 Replies
- PaulDBrownCommunity Champion
Not too sure, but I believe the new REMOVEFILTERS can remove all filters: REMOVEFILTERS ().
- anandavSkilled 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
- amitchandakSuper User
Can it be done calculate by using cross filter or cross join
CALCULATE(DISTINCTCOUNT(Sales[Sale Cust]), vAG,crossfilter(<>,<>,none))
- Ashish_MathurSuper User
Hi,
It will be a lot easier to help if you share some data, explain the business context and also show the expected result.
- v-juanli-msftCommunity Support
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.- anandavSkilled Sharer
Thanks a lot for the help and really appreciate it. That works perfectly. :smileyhappy: