How do I merge a horizontal and vertical table together (calc)?

I’m trying to merge a horizontal and vertical table together.

This link explains what im trying to do: click!

Original:

Result after merging:
Result after merging

And ideas?

(edit: activated screenshots)

late … but perhaps helps somebody …

  1. there is ‘transpose’ on copy and ‘paste special’ [ctrl-shift-v] and on filtering with ‘copy result to’ and maybe other functionalities, it will ‘flip’ the data ‘diagonally’, after that merging should be easy,
  2. i’m not very used to ‘pivot tables’, but think they might offer options for such tasks too …