Quantcast

Tables

classic Classic list List threaded Threaded
2 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Tables

Rajeshms
Hi All,

The below is the sample data which has two variables, Formula_Number_Tested and Ingredient. This data tells each Ingredient present in respective formula number. I am trying hard to generate a table : 

It is easy to show Total Number of formula each Ingredient was tested in one table, but how to get the same table when I split the results based on Formula_Number_Tested. When i do this each table shows me that respective Ingredient was tested in 1 Formula. How to show count of all Formula_Number_Tested  when I split results based on Formula_Number_Tested.  

Formula_Number_Tested    Ingredient                            

1                                      BPO
1                                      Zinc
1                                      Water
1                                      Talc
1                                      Sodium Hydroxide
2                                      Disodium EDTA
2                                      BPO
2                                      Zinc
2                                      Water
3                                      Talc
3                                      Titanium Dioxide
3                                      Glycerin
4                                      Dimethicone
4                                      Water
4                                      BPO
4                                      Disodium EDTA
5                                      Water
5                                      Glycerin
5                                      Titanium Dioxide
5                                      Dimethicone

Expecting Results as follows:

For Formula_Number_Tested :1

Ingredient    Total Formula_Tested
BPO            3
Zinc             2
Water          4
Talc             2

For Formula_Number_Tested : 2

Ingredient             Total Formula_Tested
Disodium EDTA     2
BPO                      3
Zinc                      2
Water                    4

similarly for all the Formula_Number_Tested we have to generate the results like this, I tried doing split results by Formula_Number_Tested , then it shows results correctly but Total number of formula tested is 1 only for all Ingredients of that formula tested. how can we put the count of all other formula count when that ingredient is tested in those formula. I am doing this because there are other variables in the data which will be put in that table to get meaning. Please help me to solve this problem. If this is not clear please let me know, Thanks.

Best

Regards,

Rajesh M S




===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tables

David Marso
Administrator
Maybe use AGGREGATE followed by WEIGHT before the SPLIT and TABLE?
YMMV.

---
Rajeshms wrote
Hi All,

The below is the sample data which has two variables, *Formula_Number_Tested
*and *Ingredient*. This data tells each *Ingredient *present in respective
formula number. I am trying hard to generate a table :

It is easy to show Total Number of formula each Ingredient was tested in
one table, but how to get the same table when I split the results based on
*Formula_Number_Tested*. When i do this each table shows me that
respective *Ingredient
*was tested in 1 Formula. How to show count of all
*Formula_Number_Tested * when
I split results based on *Formula_Number_Tested. *

*Formula_Number_Tested    Ingredient  *

1                                      BPO
1                                      Zinc
1                                      Water
1                                      Talc
1                                      Sodium Hydroxide
2                                      Disodium EDTA
2                                      BPO
2                                      Zinc
2                                      Water
3                                      Talc
3                                      Titanium Dioxide
3                                      Glycerin
4                                      Dimethicone
4                                      Water
4                                      BPO
4                                      Disodium EDTA
5                                      Water
5                                      Glycerin
5                                      Titanium Dioxide
5                                      Dimethicone

Expecting Results as follows:

*For Formula_Number_Tested :1*

*Ingredient    Total Formula_Tested*
*BPO            3*
*Zinc             2*
*Water          4*
*Talc             2*

*For Formula_Number_Tested : 2*

*Ingredient             Total Formula_Tested*
*Disodium EDTA     2*
*BPO                      3*
*Zinc                      2*
*Water                    4*

*similarly for all the* *Formula_Number_Tested *we have to generate the
results like this, I tried doing split results by *Formula_Number_Tested ,
then it shows results correctly but Total number of formula tested is 1
only for all Ingredients of that formula tested. how can we put the count
of all other formula count when that ingredient is tested in those formula.
I am doing this because there are other variables in the data which will be
put in that table to get meaning. Please help me to solve this problem. If
this is not clear please let me know, Thanks.*

*Best*

Regards,

Rajesh M S

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Loading...