Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I want to assign random values between 1 to 30 for a particular category "C" alone,means all other categories will have a value of 0.
How can I achieve this?
Solved! Go to Solution.
What error message are you getting?
Otherwise if Randbetween is not working you could use something like
Column = IF('Table'[Categ] = "C",RAND()*(30-1)+1,0)
Hi,
Is this what you're after?
Column = IF('Table'[Categ] = "C",RANDBETWEEN(1,30),0)
I tried doing that but getting an error.Thanks for responding.
What error message are you getting?
Otherwise if Randbetween is not working you could use something like
Column = IF('Table'[Categ] = "C",RAND()*(30-1)+1,0)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 130 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |