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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
sophtee
Helper I
Helper I

How to combine or group multiple column into a new table

Hello everyone,

I would like to combine or group multiple columns of related row and place into a new table.

For example:I would like to have another table with HchID , Flk (Flk1 & Flk2) and respective Qty. Please note that I am using this data for other reports.

sophtee_1-1710339618468.png

So I would like the new table to be T2:

sophtee_0-1710341315207.png

 

 

 

2 ACCEPTED SOLUTIONS
wstegemann
Frequent Visitor

Hi @sophtee,

 

If you have the source data available in power query, you can do the following:

 

  1. Duplicate the source table in power query (do this twice if you would like to keep a copy of the source table)
  2. Remove the flk2 and qty2 columns from the original table
  3. Remove the flk1 and qty1 columns from the duplicated table
  4. Rename the remaining flk and qty columns so that the columns on both tables are named the same
  5. Append the original table and the duplicated table
  6. Optionally filter to remove blanks

wstegemann_0-1710344924801.png

 

View solution in original post

Anonymous
Not applicable

Hi, @sophtee 

Based on your information, I create a table:

 

vyohuamsft_0-1710399085015.png

 

You can use DAX to create what you want. Create two new tables, get data for 1 and 2, and combine them together

 

vyohuamsft_1-1710399514861.png

Table1 = SELECTCOLUMNS('Table', "HchID", 'Table'[HchID], "Flk", 'Table'[Flk1], "Qty", 'Table'[Qty1])

 

vyohuamsft_2-1710399554606.png

Table2 = SELECTCOLUMNS('Table', "HchID", 'Table'[HchID], "Flk", 'Table'[Flk2], "Qty", 'Table'[Qty2])

 

vyohuamsft_3-1710399596730.png

FinalTable = UNION(Table1, Table2)

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi, @sophtee 

Based on your information, I create a table:

 

vyohuamsft_0-1710399085015.png

 

You can use DAX to create what you want. Create two new tables, get data for 1 and 2, and combine them together

 

vyohuamsft_1-1710399514861.png

Table1 = SELECTCOLUMNS('Table', "HchID", 'Table'[HchID], "Flk", 'Table'[Flk1], "Qty", 'Table'[Qty1])

 

vyohuamsft_2-1710399554606.png

Table2 = SELECTCOLUMNS('Table', "HchID", 'Table'[HchID], "Flk", 'Table'[Flk2], "Qty", 'Table'[Qty2])

 

vyohuamsft_3-1710399596730.png

FinalTable = UNION(Table1, Table2)

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

wstegemann
Frequent Visitor

Hi @sophtee,

 

If you have the source data available in power query, you can do the following:

 

  1. Duplicate the source table in power query (do this twice if you would like to keep a copy of the source table)
  2. Remove the flk2 and qty2 columns from the original table
  3. Remove the flk1 and qty1 columns from the duplicated table
  4. Rename the remaining flk and qty columns so that the columns on both tables are named the same
  5. Append the original table and the duplicated table
  6. Optionally filter to remove blanks

wstegemann_0-1710344924801.png

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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