Forum Discussion
ChrisWilliams
10 years agoAdvocate II
Rankx with filter
I'm working on a RANKX function that involves a filter. I reviewed this answer, but it did not seem to help my scenario. I have a table called "UserMessages", and a simplified version is shown b...
- 10 years ago
Rank Top Senders = RANKX ( FILTER ( ALL ( UserMessages ); UserMessages[Direction] = "Outbound" ); CALCULATE ( SUM ( UserMessages[Messages] ); ALLEXCEPT ( UserMessages; UserMessages[User] ) ); ; DESC; DENSE )replace ; with ,
Ashish_Mathur
7 years agoSuper User
Hi,
You may drag Customer Name to the row labels and then in the Visual level filters, uncheck the blank in the Customer Name field. Write these measures
Total Sales = SUM(Data[Sales])
Rank of selected Customers = RANKX(ALLSELECTED(Data[Customer Name]),[Total sales])
Hope this helps.
Anonymous
7 years agoNot applicable
Ashish_Mathur,
Thanks for your help. It works on my mock data, but not working on my real data set which has 1.3M lines. Not sure why. I will spend some time tomorrow trying to trouble shoot. I just want to thank you first.
PBISean
- Ashish_Mathur7 years agoSuper User
You are welcome.