Forum Discussion
RANKX please help
Hello,
I need to rank clients by sales per "Own company". Ignore years.
please both calculated column and measure if possible.
Thank you.
| Own company | Client | Year | Sales | Rank |
| A | A1 | 2022 | 1000 | 1 |
| A | A2 | 2022 | 900 | 2 |
| A | A3 | 2022 | 800 | 3 |
| A | A1 | 2023 | 1000 | 1 |
| A | A2 | 2023 | 900 | 2 |
| A | A3 | 2023 | 800 | 3 |
| B | B1 | 2022 | 1000 | 1 |
| B | B2 | 2022 | 900 | 2 |
| B | B3 | 2022 | 800 | 3 |
| B | B1 | 2023 | 1000 | 1 |
| B | B2 | 2023 | 900 | 2 |
| B | B3 | 2023 | 800 | 3 |
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
https://1drv.ms/u/s!AiUZ0Ws7G26RiWff-kXJ0D3ta_JH?e=NowbJy
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
2 Replies
- AhmedxSuper User
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
https://1drv.ms/u/s!AiUZ0Ws7G26RiWff-kXJ0D3ta_JH?e=NowbJy
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
- Ashish_MathurSuper User
Hi,
Drag Own Company and Client to the Table visual. Write these measures
S = sum(Data[Sales])
Rank = rankx(all(Data[Client]),[s])
Hope this helps.