Forum Discussion
pivot through DAX expression
Hello Experts,
Is it possible to change the following with DAX expressions instead of using power query ?
3 Replies
- tackytechtomMost Valuable Professional
Hi koorosh ,
It is not impossible to do pivoting in DAX, but very often there are better solutions depending on what you would like to achieve. Is this a particular visual you are after?
Here is an example / discussion about a similar issue that might give you some additional inspiration 🙂
Solved: Pivot or Transpose Table using DAX rather than Pow... - Microsoft Power BI Community
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/ - AnonymousNot applicable
Hi koorosh
Original data :
You can create a calculated table like this :
Table 2 = SUMMARIZECOLUMNS('Table'[ID],"A1", CALCULATE ( MAX ( 'Table'[Values] ), 'Table'[Attributes] = "A1" ), "A2", CALCULATE ( MAX ( 'Table'[Values] ), 'Table'[Attributes] = "A2" ), "A3", CALCULATE ( MAX ( 'Table'[Values] ), 'Table'[Attributes] = "A3" ))Then add a table visual to display column [A1][ A2][ A3] .
I have attached my pbix file , you can refer to it .
Best Regard
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- kooroshPost Partisan
Hi Ailsa,
Thanks, but how you did make ID in the Table? Especially when the data become large.Best Regards
Koorrosh