Restructure from wide to long dataset with missing time points


I'm trying to restructure a wide dataset into a long one with variables at 3 time points ( M1, M2, M3). However, for some variables I don't have data for all three time points, meaning I only have M1 and M2 or M2 and M3 only. While restructuring SPSS gives me this message: 'The same number of source variables is required for each target variable.'

Is there a solution to this? How would I restructure unequal number of source variables in SPSS.

Would really appreciate it if someone can help. Thank you !