MacMost Q&A Forum • View All Forum QuestionsAsk a Question

How Do I Generate a Random Selection From a Filtered Table?

I have my rather large vinyl collection entered into numbers. I used this INDEX(TABLE 1::F1:F2020,RANDBETWEEN(1,2020)) to create a random play generator. Now, I would like to take this a step further. I want to filter my library by year of release (which I can already do), and THEN generate a random selection from those filtered results. Is this possible?

As I am disabled, my music collection is the best way to help me deal with chronic pain. I often play titles from a specific year…such as 1971…to think about their 50 year anniversaries and what they mean to me.
I can already create a random selection from my entire Library, I want to learn how create a random selection from filtered results.
—–
Jon Christensen

Comments: One Response to “How Do I Generate a Random Selection From a Filtered Table?”

    3 years ago

    The way I would do it is to sort and a filter. Create a column that just has a random number in it using RAND to get a decimal between 0 and 1. Then create a filter to only show the year you want, like 1971. Sort by the RAND column to get your order from that and take the first 10 or however many from the top.

    I have actually been doing the same thing, but with Apple Music. I found there are public playlists for things like "Rock 1979" and they are great fun to listen to.

Comments Closed.