7 Replies Latest reply on May 2, 2013 4:07 AM by Marc Freixa

    Count different aggregated results

    Marc Freixa

      Hi All!

       

      I have a question and I'm not finding how to get along with it!

       

      I want to create a field (or measure) that is 1 (active) or 0 (not active) depending on certain conditions. It works well. But now I want to count how many Actives and not-actives exists per different cells.

       

      Here I attach an example:

      I want to know how many weeks per months are active and how many are not-active (and then work with them as a subgorup).

      A week is active if the sum of all the activities during that monh is greater than 0 and is not-active otherwise.

      As I said, it is very easy to calculate this, but the result I have is:

       

      (see below the table)

       

      MonthWeekChannelActivity 1Activity 2Activity 3Activity 4Activity 5
      jan1A04527
      jan1B5106510
      jan1C56864
      jan1D82160
      jan1E39577
      jan2A445510
      jan2B30563
      jan2C78823
      jan2D103315
      jan2E50792
      jan3A00000
      jan3B00000
      jan3C00000
      jan3D00000
      jan3E00000
      jan4A36979
      jan4B109626
      jan4C610505
      jan4D27834
      jan4E104386
      feb1A28706
      feb1B291037
      feb1C110959
      feb1D84625
      feb1E203106

       

      That's what I find (which is correct):

       

      MonthWeek
      jan11
      jan21
      jan30
      jan41
      feb11
      feb20
      feb30
      feb41

       

      But I want a table like this:

       

      Jan: 3 (three active weeks)

      Feb: 2 (two active weeks)

       

      I don't know how to do it (without changing the database structure (or excel)....

       

      I also attach the whole tableau (v7) with all these....

       

      Thanks a lot!

       

      marc.