How to do "group by" a list of items?

Hi all,

I have a data type “golf drills” and it has a data field “skills” (list). Each drill has multiple skills assigned to it. I am trying to group drills by skills, but I cannot seem to get around the limitation that the group by is possible only with the single item data fields - in other words, it is not possible with lists.

Is there any other way to achieve this? I am tackling this multiple times in the past few weeks but haven’t gotten to a solution. I researched the forum and there is some mention of community members attempting to solve this, but no solutions yet.

Any ideas?

As far as I know, it’s not really possible to perform a group by using a list field. You’ll probably need to find an alternative solution to address your issue — and depending on the case, it might even be worth redesigning your database structure.

Could you explain in more detail what exactly you’re trying to achieve?

1 Like

Can you explain what you want to achieve with the group by?
Group by with a list sound strange to me… I would like to understand what you expect to do with the group by…

Edit (simplified): I am trying to get a cumulative (count) for each skill of the “list of skills” data field. So if were to group by list of skills, and extract each skill out of the “list of skills”, then I’d be able to work with them.

Say there are 30 drills (items), each has 4 different skills (list), cumulatively, that is 120 skills. I need to display those skills by count. For example, skill 1 occurs, say 60 times (display that result 1st), skill 2 that occurs 30 times (display that result 2nd), skills 3 and 4 occur 15 times and 15 times (display them 3rd and 4th). I’m trying to display this graphically, in pie chart.

I tried all those functions but couldn’t get them to work.

This image shows the expression where I group by a data field “Primary Skill” which is a single value data field, not a list. I have a “list of skills” data field which is not offered in the “field 1 to group by”


I have data fields “primary” “secondary” and “tertiary” skills for each “drill”. I consolidated those three into one data field “list of skills”, and instead of showing three different skills graphs 1st 2nd 3rd, I am trying to show one single graph with “skills”.

Edit: This is how it’s organized.

I think your issue is that you are using a list from option set. Bubble doesn’t allow grouping on option set actually. However ,I’m not sure about exactly how you set everything
So option A) Create a DB for skills instead of using option set. You will be able to group by,
B) Didn’t test this one, but it should work. Better to use a state to load drill data and do the job using the state value list. You will use Get all options set to set the text of the chart series. To get the count: Get all option set :format as text:split by, :converted to number. In the format as text, you will have two box. Top box: Do a search for (Or better if you use state… in this case use :filtered by) ? where Skills option set contain This option… :count. Bottom box, just put a comma.

Hi @Jici

Thank you for sharing this. Just tried it and you cannot reference “This option” when you do :filtered by. It is not accessible in a second layer.

So I did Get an option :format as text (top box I entered…) do a search for drill’s skills option set:filtered by (inside filtered by I can reference “this option set” that belongs to the do a search for, while “Get an option’s” option is not available.

This is an example of what’s accessible, just for the sake of the example, this is do a search for drill :filtered by, and filtered by gives me This Drill but no This Option (that belongs to “Get option”)

Expression in “Values” “All Drill Skills OS” is “Get an Option…”

This topic was automatically closed after 70 days. New replies are no longer allowed.