I want to pick random row from row
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Sshasnk
8 - Asteroid
‎12-07-2022
07:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
have to pick a random from each fund
Input:
Fund | amount | prior year amount |
ABC | 123 | 145 |
ABC | 145 | 156 |
LMN | 1456 | 15 |
LMN | 159 | 23 |
XYZ | 456 | 56 |
XYZ | 23 | 14 |
ABC | 156 | 45 |
XYZ | 456 | 56 |
XYZ | 23 | 14 |
Example:
1. ABC Fund is three if you count So I have to pick a number from 1 to 3 and whichever number comes I have to pick that row value
2. In short one random value from each fund
Fund | amount | prior year amount | Random |
ABC | 123 | 145 | |
ABC | 145 | 156 | X |
ABC | 156 | 45 | |
LMN | 1456 | 15 | X |
LMN | 159 | 23 | |
XYZ | 456 | 56 | |
XYZ | 23 | 14 | X |
XYZ | 456 | 56 | |
XYZ | 23 | 14 |
Labels:
3 REPLIES 3
gautiergodard
13 - Pulsar
‎12-07-2022
07:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @Sshasnk
Here is one way you could do this:
The rand() formula will generate a random value every run, so you can sort on it and use a sample tool after to select a value.
Hope this helps.
ShankerV
17 - Castor
‎12-07-2022
07:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
DavidSkaife
14 - Magnetar
‎12-07-2022
07:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
