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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
vibhoryadav23
Helper II
Helper II

Create new table by transposing/Crosstab a data table

Hi, 

 

I need to crosstab/transpose data from one table to create a new table as shown in example below.

 

Original Table:

UserWeek     Status
A1Week1     Active
A1Week2     Inactive
A1Week3     Deleted
A2Week1     Active
A2Week2     Active
A2Week3     Deleted
A3Week1     Active
A3Week2     Active
A3Week3     Active
A4Week3     Idle
A5     Week2     Active
A5Week3Active

 

New Table/Changed format/Desired output:

UserWeek1Week2Week3
A1Active     Inactive     Deleted
A2Active     Active     Deleted
A3Active     Active     Active
A4  Idle
A5 Active     Active

Can anyone help me with the same? Thanks in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@vibhoryadav23 ,

In matrix viusal , Week on column , Max of Status measure as value

 

 

Or if need a new table, Unpivot in Power Query- Take max of status -> If it does not give Option, After table is created you will see List.Count in script(formula), Make that List.Max

 

https://radacad.com/pivot-and-unpivot-with-power-bi

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@vibhoryadav23 ,

In matrix viusal , Week on column , Max of Status measure as value

 

 

Or if need a new table, Unpivot in Power Query- Take max of status -> If it does not give Option, After table is created you will see List.Count in script(formula), Make that List.Max

 

https://radacad.com/pivot-and-unpivot-with-power-bi

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak ,

 

Thanks for your response. The second option works but it changes my current data. Is it possible to create a new table instead of changing the existing table?

@vibhoryadav23 , Right click on table in power query and duplicate. Or Copy paste , then unpivot

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.