'How can I transform rows to columns? [duplicate]
I have this table with data below and need help because I don't know which formula can I use to convert the table into the desired one.
I don't know if it's possible with ARRAYFORMULA, QUERY or TRANSPOSE
Current Data Set:
| Date | E1 | E2 | E3 |
|---|---|---|---|
| 4/01/2021 | 4,17% | 3,53% | 3,16% |
| 11/01/2021 | 4,40% | 3,69% | 3,58% |
| 18/01/2021 | 4,93% | 4,39% | 4,10% |
Expected Output:
| Date | Type | Metric |
|---|---|---|
| 4/01/2021 | E1 | 4,17% |
| 4/01/2021 | E2 | 3,53% |
| 4/01/2021 | E3 | 3,16% |
| 11/01/2021 | E1 | 4,40% |
| 11/01/2021 | E2 | 3,69% |
| 11/01/2021 | E3 | 3,58% |
| 18/01/2021 | E1 | 4,93% |
| 18/01/2021 | E2 | 4,39% |
| 18/01/2021 | E3 | 4,10% |
Solution 1:[1]
use:
={"Date"\ "Type"\ "Metric"; INDEX(QUERY(SPLIT(
FLATTEN(A2:A6&"×"&B1:L1&"×"&B2:L6); "×");
"where Col3 is not null"; ))}
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 |

