I have data that's a bit complex. I need to be able to filter the results to a group of rows based on the value in a column called Cohorts. The source data looks like this:

I need to be able to group the data by Program and then show only rows matching either Cohort "C1" or "C2", based on user selection. In Google sheets, I can add a Data Validation field and use that for Vlookups, but this is for filtering of the charts. Ultimately, I'd want to do this in something like Google Data Studio, but I'm just trying to understand how to create a method to dynamically select the correct data here in a simple spreadsheet/chart for now.
Update:
I can manually create a summary of the data in a new table and produce the following chart, but the goal, if possible, is to do all of this dynamically:

Thanks in advance for any advice.