This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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 April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |