2 Replies Latest reply on May 4, 2018 4:25 AM by Rajhesh Kumar A S A

    Count of Subcategory in a Category

    Rajhesh Kumar A S A

      Hi Experts,

       

          I need to calculate the count of subcategory for each category (distinct category) and I need to split into the following, as below

         

      Input Sample Data :

       

      WkCategorySubcategory
      Week1ABCA1
      Week1DEFA2
      Week1ABCB1
      Week2GHIA3
      Week2GHIA5
      Week2GHIA7
      Week2GHIA9
      Week3GHIA11
      Week3KLMB9
      Week3KLMB10
      Week3KLMB11
      Week3KLMB12

       

      And the output should be as below

       

      Wk1Cat-1SubCat1Cat - 2SubCat1Cat - 3SubCat1Cat - 4SubCat1Cat > 4 Subcat
      Week112000
      Week200005
      Week300040

       

      This is a sample data. I have more weeks and so the data has to be dynamic, when adding new / upcoming weeks data. Kindly let me know, in achieving this. Thanks guys.