Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All, Can someone help me with Pivote, I know there is a sequence for transpose/pivote/unpivot to have a single row.
example:
Data | |||||||
Code | Month name | A | B | C | D | E | F |
100 | jan | M1 | 11 | 12 | 13 | 14 | 15 |
101 | jan | M2 | 21 | 22 | 23 | 24 | 25 |
102 | feb | M3 | 31 | 23 | 24 | 25 | 26 |
103 | feb | M1 | 41 | 24 | 25 | 26 | 27 |
104 | mar | M2 | 51 | 25 | 26 | 27 | 28 |
105 | mar | M1 | 61 | 26 | 27 | 28 | 29 |
106 | april | M3 | 71 | 27 | 28 | 29 | 30 |
107 | april | M5 | 81 | 28 | 29 | 30 | 31 |
108 | jan | M7 | 91 | 29 | 30 | 31 | 32 |
109 | feb | M9 | 101 | 30 | 31 | 32 | 33 |
110 | march | M11 | 111 | 31 | 32 | 33 | 34 |
Expected Output Like this below:
Solved! Go to Solution.
Hi @durgaraop21 ,
According to your description, here's my solution.
1.Select columns from A to F, then click Unpivot Columns.
Result:
2. To sort the month name column, add a custom column:
if [Month name]="jan" then 1 else if [Month name]="feb" then 2 else if [Month name]="mar" then 3 else if [Month name]="april" then 4 else 5
Sort Month name column by MonthNo column.
In a matrix, put Code in Rows, Month name and Attribute in Columns, get the result:
I attach my sample below for your reference.
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @durgaraop21 ,
According to your description, here's my solution.
1.Select columns from A to F, then click Unpivot Columns.
Result:
2. To sort the month name column, add a custom column:
if [Month name]="jan" then 1 else if [Month name]="feb" then 2 else if [Month name]="mar" then 3 else if [Month name]="april" then 4 else 5
Sort Month name column by MonthNo column.
In a matrix, put Code in Rows, Month name and Attribute in Columns, get the result:
I attach my sample below for your reference.
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks For your help .....
Hi @durgaraop21 I do not understand your request. After creation of PQ transformation your output could be pivot table and then do as I described.
Proud to be a Super User!
Hi @durgaraop21 in Excel pivot, just drop columns Months names and Product into Columns area. I hope this help
Proud to be a Super User!
Hi @some_bih , Thanks for the reply, Only we use Power Query Editor,,......i am giving some example data in excel...
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
9 | |
7 | |
5 | |
5 | |
5 |