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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
vibhoryadav23
Helper II
Helper II

How to crosstab a table in DAX?

Hi, 

I am trying to transpose/crosstab/pivot a table directly in Dax. Is it possible?
Input Table

UserProductStatus
AProd 1Active
AProd 2Inactive
BProd 1Others
BProd 2Active
CProd 1Idle
DProd 2Active

 

Output table

UserProd 1Prod 2
AActiveInactive
BOthersActive
CIdle 
D Active

 

Thanks in advance!

1 ACCEPTED SOLUTION

Use:

New Table =
ADDCOLUMNS (
    VALUES ( 'Table'[User] ),
    "Prod1", CALCULATE ( MAX ( 'Table'[Status] ), 'Table'[Product] = "Prod 1" ),
    "Prod2", CALCULATE ( MAX ( 'Table'[Status] ), 'Table'[Product] = "Prod 2" )
)

 

New table.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@vibhoryadav23 , Use matrix visual, User on Row, product on column and max of status as value

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak Thanks for the suggestion and I have already done that but I need a ned table with this format as well.

Use:

New Table =
ADDCOLUMNS (
    VALUES ( 'Table'[User] ),
    "Prod1", CALCULATE ( MAX ( 'Table'[Status] ), 'Table'[Product] = "Prod 1" ),
    "Prod2", CALCULATE ( MAX ( 'Table'[Status] ), 'Table'[Product] = "Prod 2" )
)

 

New table.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.