Dear SAS Community,
I am having an issue with SAS that I have not experienced before when multiplying two variables. When I conduct the following calculation:
data dataset_2;
Ser_Occ=_FREQ_*Ntot;
set dataset_1;
run;
I get this result:
![KarolineN_0-1597916430743.png KarolineN_0-1597916430743.png](https://communities.sas.com/t5/image/serverpage/image-id/48451i194CB25056489C00/image-dimensions/361x190?v=v2)
I do not understand why the values of the resulting new varibale "Ser_Occ" are shifted one row down. That is, the result of the calculation of row 1, is displayed in row 2, and so on. I would like to get the result of the calculation in the same row.
I would be very grateful for some feedback from you on why SAS studio does this and how to get the values in the same row? Could it for example have to do with the settings or the underlying format of _FREQ_ which was computed using proc summary statement?
Best regards,
Karoline