I am facing problem to merge the individual data set e.g
  • Dataset 1: prepaid data for location 1 has data from Jan 2016 to Nov 2019 and
  • Dataset 2: postpaid dataset for the same location has data from Jan 2014 to Dec 2016 (as a separate file). But when I am using
merge m:m cid using "....dataset1" command it's not correctly organized the time variable (year and month). i.e. it should generate like below,
cid Time EC_kwh[postpaid] EC_kwh[prepaid]
1 201401 223 0
1 201402 228 0
1 ...... ..... ....
1 201601 0 190
1 ..... .... ....
1 201911 0 184
2 201401 223 0
2 201402 228 0
2 ...... ..... ....
2 201601 0 190
2 ..... .... ....
2 201911 0 184
..
but, after using m:m cid using "....dataset1"....dataset1" command the new dataset merged like below:
cid Time EC_kwh[postpaid] EC_kwh[prepaid]
1 201401 223 .
1 201402 228 .
1 ...... ..... .
1 201512 223 .
..
Can anyone help me how to merge these two dataset same a table 1

Best regards,
Deba