I'm at a loss for how to communicate this in proper syntax, here's my best description of my needs.
I am working with a CDS entity for my data source. For the scope of this question, say that each record contains a date, four yes/no fields, and an option-set field, which contains 20 options.
I need to create a tool which will filter the records by a date range (via date picker controls), then generate a table which - for each option set value - counts how many records have "yes" values in all yes/no fields.
So my table should end up with twenty rows. One column will list out those twenty option set values, then another column will give the number of records that have that option chosen, have "yes" in the yes/no fields, and which are within the date range set by the date controls.
I have attempted several different configurations of collection(s), and different assortments of ShowColumns, AddColumns, GroupBy, Distinct and LookUps, and have hit some wall or other every time. This feels like a straightforward manipulation of my data, but I can't find any documentation that says how to do this.
Also, in my use case, I'll never need to count more than the 500 record delegation limit.