If I understand your request correctly, you would like to group your Dent Count into 3 categories: MST, PS, or Gluten Thickener. One way to accomplish this is by creating new scorecard metrics to count the number of KPI 1: MST, KPI 2: PS, and KPI 3: Gluten Thickener capsules, respectively, over your $s shift condition. This process will result in 3 additional columns in your table, with each column representing the count of capsules for each KPI condition.