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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Yubo
Helper I
Helper I

Unpivoting Columns - some cloumn's title need kept, some not,

Hello Everyone,

I want to unpivot table with 5 columns to a new table with 2 cloumns as below. 

The 1st cloumn title need to be kept in table 2.

the 2nd abd 3rd cloumn title not need in the new table, instead of, need the contents in the new table.

Please help. 

Many thanks!!

 

Power BI_2020_02_13.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Power Query has split and merge options.

In dax you can try like

union(
summarize(table,table[Date_s],"Action","Date_s"),
summarize(table,table[Date 2],table[Type1 1]),
summarize(table,table[Date 3],table[Type1 2])
)

 

Not sure how you have same column name date 2 , twice

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

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

Power Query has split and merge options.

In dax you can try like

union(
summarize(table,table[Date_s],"Action","Date_s"),
summarize(table,table[Date 2],table[Type1 1]),
summarize(table,table[Date 3],table[Type1 2])
)

 

Not sure how you have same column name date 2 , twice

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

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

Hi Super User IV,
Sorry for bothering again. The table 2 (I learn from you) is created, now I have table 3 (actually, it is query, Tried in query edit, can’t merger query and table together) need to combine Table 2 and table 3 in one final table, Please help if possible. Many thanks for your help!!

Feb24.png

 

Many thanks !!

Hi amitchandak,

It works perfectly. ( it is a typo, should be Date 3)

thank you very much!!! 😊

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.