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 Guys,
I am creating a matrix so that value column A and value column B can be collapsed and expand to column C,
relationship between the columns is C = A + B
Matrix will be something like below:
SUM C | |||||
ID | NAME | SUM D | SUM E | SUM A | SUM B |
Job1 | www | 123 | 50 | 11 | 12 |
Job2 | xxxx | 23 | 34 | 13 | 14 |
Job3 | zzzz | 23 | 50 | 15 | 16 |
so column A & B can collapes into C and expand as well.
I tryied using hierachy, tried unpivote column A and B, it just doesn't work, when i try unpivote column A and B,
the table headers end up became like below:
SUM A | SUM B | ||||
ID | NAME | SUM D | SUM E | SUM D | SUM E |
if anyone can point me in the right direction or how me how to do this would be much appreciated.
Thanks in advance
Solved! Go to Solution.
Hi @rs1249 ,
This can be done following the steps below:
ID | Name | Attribute | Value |
Job1 | www | D | 123 |
Job1 | www | E | 50 |
Job1 | www | A | 11 |
Job1 | www | B | 12 |
Job2 | xxxx | D | 23 |
Job2 | xxxx | E | 34 |
Job2 | xxxx | A | 13 |
Job2 | xxxx | B | 14 |
Job3 | zzzz | D | 23 |
Job3 | zzzz | E | 50 |
Job3 | zzzz | A | 15 |
Job3 | zzzz | B | 16 |
CAT | TOP CAT |
A | C |
B | C |
E | E |
D | D |
Then expand on columns and rows the matrix to the last level, remove the subtotals and should give you the expected result.
Check PBIX file attach.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @rs1249 ,
This can be done following the steps below:
ID | Name | Attribute | Value |
Job1 | www | D | 123 |
Job1 | www | E | 50 |
Job1 | www | A | 11 |
Job1 | www | B | 12 |
Job2 | xxxx | D | 23 |
Job2 | xxxx | E | 34 |
Job2 | xxxx | A | 13 |
Job2 | xxxx | B | 14 |
Job3 | zzzz | D | 23 |
Job3 | zzzz | E | 50 |
Job3 | zzzz | A | 15 |
Job3 | zzzz | B | 16 |
CAT | TOP CAT |
A | C |
B | C |
E | E |
D | D |
Then expand on columns and rows the matrix to the last level, remove the subtotals and should give you the expected result.
Check PBIX file attach.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCheck out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
37 | |
31 | |
26 |
User | Count |
---|---|
95 | |
50 | |
43 | |
40 | |
35 |