我在将列转换为行时遇到问题,透视似乎并没有以我想要显示的方式给我结果。
这是具有 n 行的示例数据模式:
Coulmn1 Column2
Customer C1
Account A1
Transaction T1
Transaction T2
Transaction T3
Account A2
Transaction T11
Transaction T12
Transaction T13
Customer C2
Account A11
Transaction T111
Transaction T112
Transaction T113
Account A12
Transaction T1111
Transaction T1112
Transaction T1113
我想将其转换为以下格式
Customer Account Transaction
C1 A1 T1
C1 A1 T2
C1 A1 T3
C1 A2 T11
C1 A2 T12
C1 A2 T13
C2 A11 T111
C2 A11 T112
C2 A11 T113
C2 A12 T1111
C2 A12 T1112
C2 A12 T1113