Forum Discussion
DAX: Pivot table with multiple values.
I have a table as below
Emp ID |Managers |Roles
| A | B | Unit head |
| A | C | Biz HR |
| A | D | Biz HR |
| A | E | Biz HR |
| A | F | Ops Controller |
| A | G | Biz HR Manager |
| A | H | Budget Approver |
Using DAX how can we pivot this table as below output
Emp ID |Unit Head |Biz HR 1 |Biz HR 2 |Biz HR 3|Ops Controller |Biz HR Manager |Budget Appover
A B C D E F G H
Any help please
Mohan V
- Anonymous7 years ago
AlB I got the solution buddy,
To get the ranks i tried the below dax,
And then i pivoted the table using below dax,
The only issue with this workaround is, each time i have manually add the column for the n no of emp id's
And i tried your dax, sorry, it didnt worked, the Ranks2 column is what the output in above image
Thanks,
Mohan V
12 Replies
- AlBCommunity Champion
Hi Anonymous
I think you need to use the Pivot/Unpivot features in the query editor for that, rather than DAX
- AnonymousNot applicable
AlB thanks for the reply.
Well, thanks for the suggestion, but i cant use the power query,
Because my data model is SSAS, sql server 2016 enterprise.- AlBCommunity Champion
Hi Anonymous
What would the desired output be in your example if A had as Budget Approvers H and J instead of only H?