Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

View all the Fabric Data Days sessions on demand. View schedule

Reply
koorosh
Post Partisan
Post Partisan

pivot through DAX expression

Hello Experts,

Is it possible to change the following with DAX expressions instead of using power query ?

 

koorosh_0-1645553663337.png

 

3 REPLIES 3
Anonymous
Not applicable

Hi @koorosh 

Original data :

Ailsamsft_0-1645770656278.png

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] .

Ailsamsft_1-1645770656279.png

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.

Hi Ailsa, 
Thanks, but how you did make ID in the Table? Especially when the data become large.

 

Best Regards

Koorrosh

 

tackytechtom
Super User
Super User

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/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors