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
PowerBiKing
Frequent Visitor

Add identifier column before appending queries

Hi,

 

I'm bringing a PDF into Power BI that contains 3 tables that I would like to append to create one "master" table. All of the columns match up, and I can append the data as needed with no issue. However, I need a column in the new "master" table that identifies each row's source table.

 

I want to add a column called "Source" to the query for each of the source tables, of which every value will correspond to that source. E.g. the every value in the "Source" column in Table 1 of 3 will be "Table 1" etc. My thinking is that when I append the 3 tables, I will be able to differentiate which table the data originally came from using the "Source" column.

 

I'm relatively new to this, so I may be missing something obvious but I'm struggling to do this, as there doesn't appear to be a way to add a column with manual values to a table?

 

I should add that I can't add the identifying column before processing as I am not the publisher of the PDF, and it is updated weekly.

 

Example of the logic:

 

Table 1

Source (to add)2021 Value2022 Value
Table 1345546

 

Table 2

Source (to add)2021 Value2022 Value
Table 2456123

 

Master/appended table

Source (to add)2021 Value2022 Value
Table 1345546
Table 2456123

 

 

Thanks

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @PowerBiKing ,

 

I may be missing something here, but can't you just add a new custom column to each query with the calculation = "Source 1/2/3" ?

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
BA_Pete
Super User
Super User

Hi @PowerBiKing ,

 

I may be missing something here, but can't you just add a new custom column to each query with the calculation = "Source 1/2/3" ?

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Ah yes thank you!

 

When I tried this earlier I couldn't get it to work (think I missed off the quotations) and I assumed that you couldn't just hard code 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 Fabric 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.