'Table transformation Google Sheets

I'm trying to convert such table:

pic1

into such table:

pic2

First table is very big, and is being changed automatically by another user.

I'd like to use Google Sheets' query function. Any idea how?

Thanks in advance!



Solution 1:[1]

use:

=INDEX(QUERY(SPLIT(FLATTEN(B1:D1&"×"&A2:A&"×"&B2:D), "×"), 
 "where Col2 is not null"))

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 player0