Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
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