Forum Discussion
Rankx with filter
- 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 ,
Hi Chris,
I have been searching for help on my challenge and run into this post. I tried to modify your solution to my situation but it is not working somehow. My situation is a little bit different.
A simplified table is below. What I want is to rank the Customer Name by Sales BUT EXCLUDING all the Customers with Blank names (let's call them anyomymous customers).
The formula I came up after modelling yours is:
Thanks for help.
PBISean
| Customer Name | Sales | Sales Order Num |
| A | 800 | 1 |
| B | 700 | 2 |
| C | 600 | 3 |
| D | 500 | 4 |
| E | 400 | 5 |
| 300 | 6 | |
| F | 200 | 7 |
| G | 100 | 8 |
| A | 80 | 9 |
| B | 70 | 10 |
| C | 60 | 11 |
| D | 50 | 12 |
| E | 40 | 13 |
| 30 | 14 | |
| F | 20 | 15 |
| G | 10 | 16 |
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])
- Anonymous7 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.