Hi!
I’m trying to display a chart with a dynamically generated count of Things from the database. Reading through threads here, it looks like Group By might be the answer, but I can’t use it because I’m trying to count off a List field, and so would have to refactor my database table. Before I do that, I was hoping there was a simpler answer…
I have a Thing “company”. Each “company” has a column (the list) called “ownership”, which can have N designations included in it, such that:
Company
- Woman owned
- Minority owned
- Veteran owned
Any company could be zero or up to all three of those, such that the list field “ownership” could be empty or potentially read “woman owned, minority owned, veteran owned”.
For any selection of companies, I want to present a graph that shows the number of companies that meets each unique designation.
So for some subset of companies, I’d want the graph to show (for example):
- Woman owned companies: 3
- Minority owned companies: 2
- Veteran owned companies: 6
Understanding that one company may carry zero, one, two, or three of those designations, and could therefore be counted up to three times, once per designation.
I’ve been able to do this in a repeating group, where the first column is the ownership designations, then I use the Column 1 value to do the count in the second column, but I can’t figure out how to consolidate this into a single search to provide the graph with a list of numbers to plot.
Am I in refactor territory, or have I missed a simple resolution?