Forum Discussion
Pivot Table (Difficulties in making a pivot table)
Hi,
I've been needing help creating a pivot table for several days and all my attempts have failed.
I start from a table of the type.
| Mois | rubrique | valeur | Nss | bloc |
| 1 | R_Principale1 | V_Principale1 | V_Principale1 | 1 |
| 1 | R1 | 1VR1A | V_Principale1 | 1 |
| 1 | R2 | 1VR2A | V_Principale1 | 1 |
| 1 | R3 | 1VR3A | V_Principale1 | 1 |
| 1 | R4 | 1VR4A | V_Principale1 | 1 |
| 1 | R1 | 1VR1B | V_Principale1 | 2 |
| 1 | R2 | 1VR2B | V_Principale1 | 2 |
| 1 | R3 | 1VR3B | V_Principale1 | 2 |
| 1 | R4 | 1VR4B | V_Principale1 | 2 |
| 1 | R_Principale2 | V_Principale2 | V_Principale2 | 3 |
| 1 | R1 | 1VR1C | V_Principale2 | 3 |
| 1 | R2 | 1VR2C | V_Principale2 | 3 |
| 1 | R3 | 1VR3C | V_Principale2 | 3 |
| 1 | R4 | 1VR4C | V_Principale2 | 3 |
| 2 | R_Principale1 | V_Principale1 | V_Principale1 | 4 |
| 2 | R1 | 2VR1A | V_Principale1 | 4 |
| 2 | R2 | 2VR2A | V_Principale1 | 4 |
| 2 | R3 | 2VR3A | V_Principale1 | 4 |
| 2 | R4 | 2VR4A | V_Principale1 | 4 |
| 2 | R1 | 2VR1B | V_Principale1 | 5 |
| 2 | R2 | 2VR2B | V_Principale1 | 5 |
| 2 | R3 | 2VR3B | V_Principale1 | 5 |
| 2 | R4 | 2VR4B | V_Principale1 | 5 |
| 2 | R_Principale2 | V_Principale2 | V_Principale2 | 6 |
| 2 | R1 | 2VR1C | V_Principale2 | 6 |
| 2 | R2 | 2VR2C | V_Principale2 | 6 |
| 2 | R3 | 2VR3C | V_Principale2 | 6 |
| 2 | R4 | 2VR4C | V_Principale2 | 6 |
The result to be obtained is as follows: Would any of you be kind enough to help me find a solution?
| Nss | bloc | Mois | R1 | R2 | R3 | R4 |
| V_Principale1 | 1 | 1 | 1VR1A | 1VR2A | 1VR3A | 1VR4A |
| V_Principale1 | 2 | 1 | 1VR1B | 1VR2B | 1VR3B | 1VR4B |
| V_Principale1 | 4 | 2 | 2VR1A | 2VR2A | 2VR3A | 2VR4A |
| V_Principale1 | 5 | 2 | 2VR1B | 2VR2B | 2VR3B | 2VR4B |
| V_Principale2 | 3 | 1 | 1VR1C | 1VR2C | 1VR3C | 1VR4C |
| V_Principale2 | 6 | 2 | 2VR1C | 2VR2C | 2VR3C | 2VR4C |
Thank you in advance because I am really at an impasse
Attached table and desired result in Excel
https://www.dropbox.com/t/4dEgRk2QmbNv22AP
Philippe Muniesa
You can achieve this using power query editor.
select Rbrique column and click on Pivot column option in transform tab.
and remove unnecessary columns.
you will get result like this
2 Replies
- vaibhavkale570Resolver III
You can achieve this using power query editor.
select Rbrique column and click on Pivot column option in transform tab.
and remove unnecessary columns.
you will get result like this
- PhilippeMuniesaResolver I
Good evening,
I don't understand why I couldn't do it using the same technique, if not because I had other columns (indexes) etc. used to modify the table, and I hadn't deleted.
Thanks to you, I deleted the extra columns and actually saw a correct result. A big thank you because now I can continue to build this project.
Philippe