Dear all,

I have a data-set like the one below which reports the share of let's say export of ID to different regions. The data set includes other variables as well.
id region1 region1 % region2 region2 %
1 EU 95 US 5
2 US 90 Japan 10
My goal is to create as many columns as the number of possible regions in my dataset. In order to do so, I will have to extract the 'unique' values between the variables region1 and region2 and then populate the new column with the respective %.

Hence, the new dataset should look like this one:
id EU US Japan
1 95 5 .
2 . 90 10
I know that LEVELSOF would be useful here, but I cannot quite figure out how to use the levels to then create new variables.

Any help would be very much appreciated!
Thanks,