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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
aanmi
Helper I
Helper I

Combine data column from different table

Hi

 

May I know is there any way to combine same data column into one table?

For example I have created three different table as below

 

pbi1.png

 

and I want to combine all data to be visualize in one table as below: 

 

pbi2.png

 

Kindly advise how can I create combined data table asshown above since I already try to use UNION DAX command before but the result is not same.

1 ACCEPTED SOLUTION

First add the new column in each table. You should the  have 3 tables with 3 columns.  All columns have the same column headings

 

then append the tables into 1 long table. 

 

When end you have 1 table, then unpivot the country and subject columns. When you do this, you will be asked which column to aggregate, and how. Select sum of the numeric column



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

5 REPLIES 5
MattAllington
Community Champion
Community Champion

For each table, add a new column identifying the table (either Maths, science, physics)

call this column "subject" in all cases

append the 3 tables together

pivot the first 2 columns, with sum on the numeric column



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Hye Matt

 

Could you explain how can I add another column with same record for more than 3000 rows for each table?

Select "add custom column"

enter ="my value" in the formula box



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Hi Matt

 

I managed to add custom column as you advised but unfortunately after I try to pivot the first 2 column I didnt get the result that I want.,

What do you mean by "pivot the first 2 columns, with sum on the numeric column"

Do I need to pivot country name column and subject column for all three tables?

And how to do - sum on the numeric column as you advised earlier?

First add the new column in each table. You should the  have 3 tables with 3 columns.  All columns have the same column headings

 

then append the tables into 1 long table. 

 

When end you have 1 table, then unpivot the country and subject columns. When you do this, you will be asked which column to aggregate, and how. Select sum of the numeric column



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors