Forum Discussion

IF's avatar
IF
Post Prodigy
6 years ago

Exception for sub-total

Hi,
I want to re-do a table that was done in excel. I have the following data:

XXYYABCDEFGIJMPRPPRR
353532M236234675546922119%5%
353533M23321252552481496%4%
353536M251334675546922119%4%
353537M26343252652481596%3%
353551M257464675546922119%4%
353552M25566252552481495%4%
353553M244554675546322119%5%
353555M35258252552481494%3%
353601M2415946955469241110%5%
353602M25135292852412198%4%
353604M264534675946922158%6%
353607M231382525824214126%5%
353801M2223246755469221110%5%
353802M23039252552491496%4%
353803M2294596755663241110%5%
353804M22876252552481496%4%
353805M2258966755469221110%5%

 

 

Based on this data, I would like to display similar table as it is show below. This  table should be done for each XX value. I only provided an example for the first one.

 

XXYYABCPPRR
353532M2362349%5%
353533M2332126%4%
353536M2513349%4%
353537M2634326%3%
   34 3% 
Total(N) 983861226%16%
Total(%)  8.7%14.0%2.2%60.7%

 

For Column B, I must subtract total of M value for each XX column(category). For example; The M values for 35353 is 9+8+9+8=34. Only for B column the logic should be 23+21+33+43-34=86. PP column also should have similar logic with percentage. 3% is coming from 34/983.

 

I used matrix. I can have subtotals but not the sub-total percentage and subtotal(N) together. Can anyone help me for this issue...

 

All the best,

 

3 Replies

  • IF , not very clear

    But it would be like

    New B = Sum(Table[B])- Sum(Table[M])

    % = Divide([New B], Sum(Table[B])) , what is denominator for % ?

    • IF's avatar
      IF
      Post Prodigy

      Hi,

      Thanks for the answer. Sorry for being unclear. Based on the data, I want to have the following table:

        ABCPPRR
      353532M2362349%5%
      353533M2332126%4%
      353536M2513349%4%
      353537M2634326%3%
         34 3% 
      Total(N) 983861226%16%
      Total(%)  8.7%1.2%  

       

      8.7% is 86/983  (SUM(B)-SUM(M))/SUM(A) However, I don't know how to show it in a table or in a similar format that I provided. This should be series for all XX values. Actually a matrix or a table is fine as well. Also as you see in Total(N), some of the totals are exclusion of SUM(M) and some of them don't include. When I have a table or matrix, it gives total with the same logic for all columns, I belive. At least, I don't know.

      All the best