Forum Discussion
dax with pivot table
I need to show a pivot table with more than one column information without drill down, so that I can't use matrix and I must use "Table" and make a "manual" pivot , transforming a specific rows in a columns. bellow follow my actual scenario where I would like to transform the order column in row
| cod client | client | project | store | order |
| 123456789 | client a | a | dist1 | 1 |
| 123456789 | client a | a | dist2 | 2 |
| 123456789 | client a | b | dist1 | 1 |
| 123456789 | client a | b | dist1 | 2 |
| 123456780 | client b | a | dist1 | 1 |
| 123456780 | client b | a | dist2 | 2 |
| 123456780 | client b | b | dist1 | 1 |
| 123456780 | client b | b | dist1 | 2 |
The desire scenario
| cod client | client | project | 1 | 2 |
| 123456789 | client a | a | dist1 | dist2 |
| 123456789 | client a | b | dist1 | dist1 |
| 123456780 | client b | a | dist1 | dist2 |
| 123456780 | client b | b | dist1 | dist1 |
I've tried to use a switch function to create a virtual column, but I couldn't. Some Idea in how to transform rows in columns using dax ?
3 Replies
- Fowmy
Super User
Anonymous
The best place to do this kind of transformation in Power Query.
For DAX, check these solutions and it can give you some guides though you will need to hardcode.
https://community.powerbi.com/t5/Desktop/DAX-Pivot-table-with-multiple-values/td-p/580431
https://www.youtube.com/watch?v=9Xv8COs59tc________________________
Did I answer your question? Mark this post as a solution, this will help others!.
I accept KUDOS 🙂
- AnonymousNot applicable
thanks, but in my scenario I got this tables from analysis Service and I wouldn't like to keep two tables (one normalized and another one not)
- mahoneypat
Microsoft Employee
What analysis/visualization will you do once you have the pivoted table? It is likely possible to create the same without the pivot.
Regards,
Pat