Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.
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.
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.
Bump
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
218 | |
88 | |
83 | |
65 | |
56 |