Hello Everyone, I just created an account and this is my first time posting on here, really hoping you guys can help! So currently, I have a dataset with about 4 million rows. The columns I have are: Hshld_no, Total_spend, Avg_Gallons, and Loyalty_segment Here is my question. When I do a cross tab between Loyalty_segment and Avg_gallons I get an output that Counts the amount of rows that fit those criteria ods html; proc freq data = out.Final_merge; table avg_gallons * Loyalty_seg; run; i.e. Loyalty_Seg AVG. Gallons 1 2 3 4 5 1 xxx xxx xxx xxx xxx 2 xxx xxx xxx xxx xxx 3 xxx xxx xxx xxx xxx 4 xxx xxx xxx xxx xxx 5 xxx xxx xxx xxx xxx I was wondering, is there a way to get this to return the sum of the spend of those attributes, rather than the count of the rows. Loyalty_Seg AVG. Gallons 1 2 3 4 5 1 500 xxx xxx xxx xxx 2 xxx xxx xxx xxx xxx 3 xxx xxx xxx xxx xxx 4 xxx xxx xxx xxx xxx 5 xxx xxx xxx xxx xxx So for example, currently it tells me that there are 500 Housholds (rows) that have an average of 1 gallons and are in loyalty_seg 1 How can I see the sum of those 500 households in this same format? Loyalty_Seg AVG. Gallons 1 2 3 4 5 1 ??? (SPEND) xxx xxx xxx xxx 2 xxx xxx xxx xxx xxx 3 xxx xxx xxx xxx xxx 4 xxx xxx xxx xxx xxx 5 xxx xxx xxx xxx xxx I hope this makes sense!
... View more