Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I have the requirement where I need to convert the multiple columns into single month column. Please see the below excel.
ProcessID | ProcessName | id | LOS | VendorID | Territory | DateDecommissioned | ForecastVolume_Jan | ForecastVolume_Feb | ForecastVolume_March | ForecastVolume_April |
10 | abc131 | abc9 | IFS | 1 | US | NULL | 527 | 622 | 274 | 93 |
12 | asdfgh | abc10 | IFS | 1 | US | NULL | 2006 | null | 1685 | null |
13 | asdfgh | abc11 | IFS | 1 | US | 1/5/2021 | 35 | 28 | 28 | 32
|
This is how I want it.
ProcessID | ProcessName | id | LOS | VendorID | Territory | DateDecommissioned | Forecast Month | Hours |
10 | abc131 | abc9 | IFS | 1 | US | NULL | Jan | 527 |
12 | asdfgh | abc10 | IFS | 1 | US | NULL | Jan | 2006 |
13 | asdfgh | abc11 | IFS | 1 | US | 1/5/2021 | Jan | 25 |
10 | abc131 | abc9 | IFS | 1 | US | NULL | Feb | 622 |
12 | asdfgh | abc10 | IFS | 1 | US | NULL | Feb | null |
13 | asdfgh | abc11 | IFS | 1 | US | 1/5/2021 | Feb | 28 |
10 | abc131 | abc9 | IFS | 1 | US | NULL | March | 274 |
12 | asdfgh | abc10 | IFS | 1 | US | NULL | March | 1685 |
13 | asdfgh | abc11 | IFS | 1 | US | 1/5/2021 | March | 28 |
10 | abc131 | abc9 | IFS | 1 | US | NULL | April | 93 |
12 | asdfgh | abc10 | IFS | 1 | US | NULL | april | null |
13 | asdfgh | abc11 | IFS | 1 | US | 1/5/2021 | april | 32 |
please help. Crosstable layout ?
Solved! Go to Solution.
Hey @rbangari001 ,
this is my sample data:
The task you have to solve is converting a table from the wide format into a table in the long format, meaning converting columns into rows.
For this reason, I mark all columns (in my example it's just the column this or that), except the columns ForecastValue_... and select the operation from the context menu Unpivot Other Columns:
The next picture shows the result of the operation:
Then I split the column now called Attribute, rename the columns accordingly and delete the column that contains the characters fc or ForecastValue respectively.
Hopefully, this provides what you are looking for.
Regards,
Tom
Hey @rbangari001 ,
this is my sample data:
The task you have to solve is converting a table from the wide format into a table in the long format, meaning converting columns into rows.
For this reason, I mark all columns (in my example it's just the column this or that), except the columns ForecastValue_... and select the operation from the context menu Unpivot Other Columns:
The next picture shows the result of the operation:
Then I split the column now called Attribute, rename the columns accordingly and delete the column that contains the characters fc or ForecastValue respectively.
Hopefully, this provides what you are looking for.
Regards,
Tom
Thank you, it worked
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |