The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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êsUser | Count |
---|---|
82 | |
81 | |
37 | |
34 | |
31 |
User | Count |
---|---|
94 | |
80 | |
60 | |
50 | |
49 |