- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Assign Random Number For Each Distinct Item
Hello,
I have a table with document numbers and $ amounts. Some document numbers have multiple amounts, so those numbers repeat within the table.
I'd like to assign random numbers to each distinct document number. Is there a way to do a FOREACH() type formula that will assign the RAND() function to each distinct value in my document number column?
Example Output:
Rand() | Doc Number | $ Amount |
.992 | 1 | 100 |
.992 | 1 | 89 |
.876 | 2 | 2000 |
.653 | 3 | 41 |
.653 | 3 | 200 |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I think my solution is to pull in the document numbers into a separate table, remove duplicates, assign random numbers, and then create a relationship between the distinct table and the table with duplicates. Still open to other ideas if someone has a better solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I think my solution is to pull in the document numbers into a separate table, remove duplicates, assign random numbers, and then create a relationship between the distinct table and the table with duplicates. Still open to other ideas if someone has a better solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Bump

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
01-06-2024 06:52 AM | |||
01-04-2024 10:46 AM | |||
09-25-2024 09:18 AM | |||
08-20-2024 10:16 PM | |||
12-22-2024 01:12 PM |
User | Count |
---|---|
141 | |
117 | |
80 | |
65 | |
47 |