cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
helalmob
Level II

How to calculate row percentage for dimension subtotal?

I have the following data with 20+ measures. Raw data shown here is a sample with only one measure. WIth Tabulate I can get subtotal for each site for all levels of Var2 (0,1,2,3) and level of Var1 (A, B). For example, the subtotal for Site1=461 (438+19+2+2). I am comparing the percentage of measure for each level of Var2 between the level of Var1 for each Site. Table1 presents subtotal for each site for each level of Var2 and Var1. Table 2 shows the percentage of the total for each level of Var2 and Var1. This is the desired percentage that I like to compare and contrast. In this example (Table 2), there is not much variability between A & B (Var1 level) across each level of Var2 (0,1,2,3) for each site. However, I need to perform similar comparisons across 20+ measures. I appreciate any guidance/help to calculate the percentages.

 

Thank you,

 

Raw Data

SiteVar1Var2Measure
Site1A0438
Site1A119
Site1A22
Site1A32
Site2A0321
Site2A10
Site2A20
Site2A30
Site1B057
Site1B14
Site1B20
Site1B30
Site2B037
Site2B11
Site2B20
Site2B30

 

Table 1

 Site1    Site2    
 Var2    Var2    
 0123 0123 
Var1NNNNTotalNNNNTotal
A4381922461321000321
B57400613710038
All4952322522358100359

 

 Site1    Site2    
 Var2    Var2    
 0123 0123 
Var1%%%%Total%%%%Total
A95%4%0%0%100%100%0%0%0%100%
B93%7%0%0%100%97%3%0%0%100%
All95%4%0%0%100%100%0%0%0%100%
1 REPLY 1
Byron_JMP
Staff

Re: How to calculate row percentage for dimension subtotal?

I'm not sure I'm tracking 100% with your question, but try this:

Analyze>Fit y by X> put Var2 in the Y role, and Var1 in the X role, Measure goes into Freq, and Site into the by role.

 

Byron_JMP_1-1647538284085.png

 

Byron_JMP_0-1647538246553.png

 

JMP Systems Engineer, Health and Life Sciences (Pharma)