This is a very interesting scenario and use case for Tableau. In the given scenario the numbers are going to recalculate every time the viz is updated as you have seen. Because every time that column is used the RAND() will be enacted. There is not a currently a way to prevent this from updating without simply preventing the whole workbook from updating. Which if there are changes being made to the Viz it will need to update to render properly.
One workaround would be to create the randomized number column in the data source itself. That way it would be static and reusable.
Interesting thought - how would that work to fix a random value for use in other calculations
I think it is important to note here that excel recalculates the random number every time it does a refresh also and the process of copying and pasting a value is like an electronic scratch pad -
Sorry if I was unclear. I mean, by generating the randomized column, then inserting just the values as a column into the data source as just values. So not really random I guess. But as you mentioned I believe using any sort of random function will cause the values to change anytime the data is modified.
OK I get it - I guess if you did that you could also have a parameter (sequential) and use it as a pointer to a random number from the list - the user could then increment the "pointer" or hold it "Fixed" or to recall history? as long as the column of numbers is random I think the effect is still random
I'm not sure i'm following the full use case but I'm hoping this at least sparks some ideas:
So from the example above something to the sort of:
(((PREVIOUS_VALUE(MIN(327680)) * 1140671485 + 12820163) % (2^24)))
That should provide sudo random values from 0 to 1.
1 of 1 people found this helpful
Once you calculate your random numbers, extract the data and re-ingest it into Tableau - viola your random numbers are now static.
I have figured out a bit of a trick that might work for you (or some future reader).
1. create Calculated Field: [Random]
2. create Calculated Field: [Random Rank]
Put the [Random Rank] as the text data in marks:
So now instead of ranking 1234 along a SUM of something etc, it will rank() across whatever that first seed is for the initial random(). The seed never changes. You can change the view filter a bunch of different ways, but when you go back to any view filter it will return the same rows with the same random rank.
3. I combined this with a Parameter: "Select How Many" , Integer, 10, automatic, all
4.Create top/bottom # filter: [Selection Filter]
if [Random Rank]<= [Select How Many] then "Top N" elseif [Random Rank]>size()-[Select How Many] then "Bottom N" else "Others" END
Then you can show the [Selection Filter] and "Select How Many" parameter and users can pick how many random records they want and if they somehow don't like that mix of random, then they can just look at the "Bottom N" random ranked outputs.
Note: My original user request was "Please give us a random of X dimension, and random Y dimension, and random Z dimension" if you get this ask, note that any multiples of a normally distributed random variable is still a normally distributed random variable. It's not more or less random along any factor, and especially as you start to approach the Central Limit Theorem (>500 best, >350 decent) then you can basically consider those as normally distributed. So having one rank([Random]) set up should give you basically the same outcome probability results.