Hi there,
I have a data set like this (The blank rows between different Patient_IDs are just for easy reading):
Patient_ID
Service_Type
Service_Volume
001
Serv_01
5
001
Serv_02
8
001
Serv_03
10
002
Serv_01
5
003
Serv_03
6
Many patients did not receive all three service types. I need to insert rows for each patient so that they all have three Service_Types and are with the value of 0 for the Service_Types that they did not receive service on. The resulting data set would be something like the following table:
Patient_ID
Service_Type
Service_Volume
001
Serv_01
5
001
Serv_02
8
001
Serv_03
10
002
Serv_01
5
002
Serv_02
0
002
Serv_03
0
003
Serv_01
0
003
Serv_02
0
003
Serv_03
6
How should I be accomplish this?
Thanks a lot!
Jason
... View more