Hi,
I want to collapse two variables, but I still want to see the other variables.
I have data for many transactions that is identified with a receiptID. I want to see the totalsum of the receipt, and therefor want to collapse following:
collapse (sum) transactions, by (receipt_id)
At the moment I just have all the transactions in one receipt_id but I want to see the receipt as one. I also have variables with gender, age and storename that I want to see together with the collapse, but I dont know how to do this.
collapse (sum) transactions (?) gender (?) storename (?) age , by (receipt_id)
I want the gender, storename and age to stay the same so I can compare the different receipts by also these variables. I don“t know what I can put in the ( ) for the variables to not change.
Can anyone help me?
I want to collapse two variables, but I still want to see the other variables.
I have data for many transactions that is identified with a receiptID. I want to see the totalsum of the receipt, and therefor want to collapse following:
collapse (sum) transactions, by (receipt_id)
At the moment I just have all the transactions in one receipt_id but I want to see the receipt as one. I also have variables with gender, age and storename that I want to see together with the collapse, but I dont know how to do this.
collapse (sum) transactions (?) gender (?) storename (?) age , by (receipt_id)
I want the gender, storename and age to stay the same so I can compare the different receipts by also these variables. I don“t know what I can put in the ( ) for the variables to not change.
Can anyone help me?
Comment