Forum Discussion
ALL function seems not working with Additional Filter Context
I am using following function to arrive at Rep wise Ranks-
SalesRank1 = RANKX(ALL('P6-OfficeSupplies'[Rep]), [SalesAfterDiscount_M], , DESC)
This gives me following correct visual-
However, when I add a Region Column which comes from the same Base Table, it seems to break-
I don't understand why the result changes when I have ALL is applied which as per my understanding means that it will compute the Rank as per Reps irrespective of any filter context. Please help.
Hi peterpan
Try below video for better understanding.
https://www.youtube.com/watch?v=Q_rMQ89ng70
If you are using a Matrix Visual, this video would help:
https://www.youtube.com/watch?v=y2FFjfRD-Bo
IF you are using a Table Visual, this video would help:
https://www.youtube.com/watch?v=tS1ff6ouORg
RANKX( ALL( 'Table'[Parent and TC City], 'Table'[Parent Org] ), [Monthly Lines] )I hope above solutions would give you desired result.
2 Replies
- bhanu_gautamSuper User
peterpan , The ALL function removes filters from the specified columns or tables. When you use ALL('P6-OfficeSupplies'[Rep]), it removes any filters on the Rep column, but it does not remove filters on other columns, such as Region.
Try using ALLSELECTED
SalesRank1 = RANKX(ALLSELECTED('P6-OfficeSupplies'[Rep]), [SalesAfterDiscount_M], , DESC) - Uzi2019Community Champion
Hi peterpan
Try below video for better understanding.
https://www.youtube.com/watch?v=Q_rMQ89ng70
If you are using a Matrix Visual, this video would help:
https://www.youtube.com/watch?v=y2FFjfRD-Bo
IF you are using a Table Visual, this video would help:
https://www.youtube.com/watch?v=tS1ff6ouORg
RANKX( ALL( 'Table'[Parent and TC City], 'Table'[Parent Org] ), [Monthly Lines] )I hope above solutions would give you desired result.