Solved

Splitting a List Equally

  • 10 August 2021
  • 3 replies
  • 2337 views

Badge +4

I see that you can get a Random Sample of a list, but I am looking for a way to break our main list into 4 equal parts.  Is there an easy way to do that within the platform?

icon

Best answer by Julia.LiMarzi 10 August 2021, 21:25

View original

3 replies

Userlevel 6
Badge +22

Hi @DCCoffee, thanks for reaching out to the Community today!

At this time there isn’t a Klaviyo tool to split a list into equal and unique parts. Instead I recommend exporting your list and using Excel, Google Sheets or a similar product to split the list and upload it as four separate lists. 

A more complex option would be to create a list-triggered flow, and add a 50% random sample split. Then beneath each branch add another 50% random sample split, so you end up with four branches. At the end of each you can add an update profile property action and tag the profiles in each branch with a group identifier. Then you can create segments based on that property. This has the benefit that these four segments will grow as your list does, however it is a random sample, and so the groupings may not be perfectly equal. 

Here’s an example of what that could look like: 

I hope this helps!

Userlevel 5
Badge +25

Hey @DCCoffee! Great question. Like @Julia.LiMarzi mentioned, there’s no easy way to split a list into 4 entirely in Klaviyo. You could use the Flows approach that Julia mentioned above, but if you decide to Export the list into 4, here are the instructions to follow using Google Sheets or Excel:

  1. Export your list to a CSV. You only need emails; don’t export any other properties. 
  2. Add a second column to the exported file and title it "Sample Bucket" (or similar) 
  3. Add this formula to the second column, but replace 100 with a number that is ¼ of your list size: =INT((ROW(B1)-1)/100)
    So, if your list contained 5,000 members, your formula would be =INT((ROW(B1)-1)/1250)
    Here’s a more in-depth reference for the process of adding the formula: https://www.extendoffice.com/documents/excel/3516-excel-increment-number-every-x-rows.html 
  4. The value of the first cell you add this formula to should be 0. Copy the formula all the way down to the bottom of the list. You should end up with the first quarter of your list displaying 0 in column B, the second quarter of your list displaying 1 in column B, and so on. 
  5. Import the CSV back into Klaviyo, and map the Sample Bucket column to a new custom profile property (also called Sample Bucket, or similar). 
  6. From there, you can create four segments. Each segment definition should be something like this: 
    Properties about someone > Sample Bucket = 0
    Properties about someone > Sample Bucket = 1
    ...and so on :) 

I hope this helps! Let me know if you have any questions about the process. 

Best,

Elise

Userlevel 1
Badge +1

Hi @DCCoffee 

I’d also recommend exporting your list and manually breaking it up into 4 parts, then re-importing it back into Klaviyo as 4 separate lists. Here are some articles under our List How-Tos for List & Segments that will provide some additional context:

 

Maria 

Reply