Forum Discussion
Anonymous
2 years agoNot applicable
Rankx with ALLSELECT +ALLEXCEPT
Hi Everyone, I am trying to differentiated the below two dax snippets based on the outer filter context. DAX 01 RANKX ( ALLSELECTED ( CUSTOMERS[CUSTOMER_PARENT_ID] ), CALCULATE ( [Total AR Amo...
Anonymous
2 years agoNot applicable
Thanks for the lengthy expalantion.
But the issue is in DAX 01 result respect the external filter context :e:g calender month.
Dangar332
Resident Rockstar
2 years agohi, Anonymous
use
RANKX (
ALLSELECTED ( CUSTOMERS[CUSTOMER_PARENT_ID] ),
CALCULATE (
[Total AR Amount],
all(CUSTOMERS),values(CUSTOMERS[CUSTOMER_PARENT_ID]) ----- (here all remove all filter context from expanded table but values restore filter context of CUSTOMERS[CUSTOMER_PARENT_ID] )
),
,
DESC,
DENSE
)
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.