Hey,
I am using Rand() function to create a table. The problem is everytime I close the .pbix and then open it again, even if I don't refresh any data, just by openning it, the table is recalculated according to that Rand. How can I avoid that? I am using it to create Control Groups and need them to remain the same across time.
Below there is an example of the code in case it helps, very simple.
Thanks a lot in advance for the help!
Code:
Solved! Go to Solution.
Update: so as I have been investigating a bit, rand formula will have this behaviour. As a workaround, I created the rand numbers in the previous table as a calculated column, with RANKX formula. Of course this will not be valid for everyone as my "User Id" is an alpha-numeric code, but if it were a number you would probably get them sorted.
Update: so as I have been investigating a bit, rand formula will have this behaviour. As a workaround, I created the rand numbers in the previous table as a calculated column, with RANKX formula. Of course this will not be valid for everyone as my "User Id" is an alpha-numeric code, but if it were a number you would probably get them sorted.
You cannot avoid that in Power BI. Create your random numbers in your data source instead.
Thanks for the reply. Although this was always an option of course, I wanted (if possible) to do it within dax as filters to main table (enriched with different ones from different sources apply, the example I sent is the simplest one but others are more tricky). But of course if someone can do it outside PBI, that's always an option.
User | Count |
---|---|
125 | |
63 | |
56 | |
48 | |
41 |
User | Count |
---|---|
116 | |
66 | |
62 | |
62 | |
45 |