Forum Discussion
Pivot DAX Column or Help with Matrix
Hi,
I have a table of Leads that basically has this structure:
| Category | Company |
| A | Com1 |
| A | Com1 |
| B | Com2 |
| A | Com5 |
| B | Com1 |
| C | Com2 |
| C | Com4 |
| A | Com3 |
| B | Com1 |
My actual table is much more complicated and the Category column is a DAX calculated column.
I need to be able to make a visual, either a table or a matrix, that looks like this:
| A | B | C |
| Com1 | Com2 | Com2 |
| Com1 | Com1 | Com4 |
| Com5 | Com1 | |
| Com3 |
So you can see each catgory along the top and a list of companies below that fall into each one. I tried setting up a matrix to do this, but couldn't get it to work.
I also wanted to unpivot to make this work, but the DAX calculated column can't be manipulted in Power Query. Any suggestions?
Thanks
Anonymous ,
What I can come out is to create three calculate tables like pattern below and create three table visuals though the duplicate values will be removed.
NewTableA = SELECTCOLUMNS(FILTER('Table', 'Table'[Category] = "A"), "A", 'Table'[Company]) NewTableB = SELECTCOLUMNS(FILTER('Table', 'Table'[Category] = "B"), "B", 'Table'[Company]) NewTableC = SELECTCOLUMNS(FILTER('Table', 'Table'[Category] = "C"), "C", 'Table'[Company])Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- parry2kSuper User
Anonymous in matrix visual, put the category on columns and company on values, and you will get the same output.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
- AnonymousNot applicable
hi parry2k
Thank you for the help!
Unfortunately if you put a company name on values then you have to pick a summary, like First. I need them to show up as a list of companies under each category.
- v-yuta-msftCommunity Support
Anonymous ,
What I can come out is to create three calculate tables like pattern below and create three table visuals though the duplicate values will be removed.
NewTableA = SELECTCOLUMNS(FILTER('Table', 'Table'[Category] = "A"), "A", 'Table'[Company]) NewTableB = SELECTCOLUMNS(FILTER('Table', 'Table'[Category] = "B"), "B", 'Table'[Company]) NewTableC = SELECTCOLUMNS(FILTER('Table', 'Table'[Category] = "C"), "C", 'Table'[Company])Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.