The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
how to get their rank by different group in dataset ??
Rapidstudent
Member Posts: 8 Learner I
in Help
I have a file ( row id, shop id, product id, totalsale)
1, A101, vegetable, 200K
2, A101, meat, 400K
3, A101, drink, 300K
4, B203, vegetable, 50K
5, B203, vegetable, 100K
6, B203, vegetable, 20K
how to get their rank by different shop group in dataset ??
the desired result :Â
1, A101, vegetable, 200K, 3(rank in A101 shop)
2, A101, meat, 400K, 1
3, A101, drink, 300K, 2
4, B203, vegetable, 50K, 2
5, B203, vegetable, 100K, 1
6, B203, vegetable, 20K, 3
Need help !
1, A101, vegetable, 200K
2, A101, meat, 400K
3, A101, drink, 300K
4, B203, vegetable, 50K
5, B203, vegetable, 100K
6, B203, vegetable, 20K
how to get their rank by different shop group in dataset ??
the desired result :Â
1, A101, vegetable, 200K, 3(rank in A101 shop)
2, A101, meat, 400K, 1
3, A101, drink, 300K, 2
4, B203, vegetable, 50K, 2
5, B203, vegetable, 100K, 1
6, B203, vegetable, 20K, 3
Need help !
1
Answers
I am not aware of a straightforward way to have a grouped rank attribute, but, you can achieve this by utilizing the loop values operator that loops over unique values, which is not much of a hassle aswell. Check out the mock XML of how the process would look like below.
Harshit
Group Into Collection by ShopId, Loop Collection, Sort (by totalsale) and append it again.
Dortmund, Germany