Good day Gray, Jenn B. (SCD)
Just checking to see how is everything. Please feel free to let me know if you need any assistance
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have 10 queries and have combined them. Now I'd like to add a column to identify the query source.
Good day Gray, Jenn B. (SCD)
Just checking to see how is everything. Please feel free to let me know if you need any assistance
Good day Gray, Jenn B. (SCD)
When you append multiple queries in Power Query, the system doesn’t automatically tag the rows with their original source, so you’ll need to add that yourself. The usual trick is: before you append, go into each query and add a Custom Column with a hardcoded label (like "Source = Query1", "Source = Query2", etc.). That way, when you combine them, each row already carries its “badge” showing where it came from. Another option is to use the Query Name dynamically with = "QueryName" typed in the custom column, but most folks just type in a descriptive string that makes sense for them.
Please try these step:
Open each of your 10 queries.
Add a custom column with a text value that identifies the query (e.g., "Sales_2024").
Append them all together.
You’ll now see a “Source” column in the combined table that tells you exactly which query each row originated from.
It’s a bit manual upfront, but it pays off later when you’re troubleshooting or analyzing across sources. Think of it like putting name tags on everyone before they walk into the same room. Makes life easier
If you find this helpful, Kindly mark “Accept Answer” so others know it worked for you and it’ll make my day too!
Use Power Query’s custom column feature and hard‑code the source name in each query before appending.
For each of the 10 queries (before the Append step):
SourceQuery. = "Query1"
Repeat for each query, changing the text (for example, "Query2", "Query3", etc.).
Then perform the Append of all 10 queries. The resulting appended table will include the SourceQuery column, showing which original query (source) each row came from.
If the custom column needs to use existing fields (for example, combining with other identifiers), use the same Custom column dialog and reference columns in the formula, such as:
= [ExistingColumn] & " - " & "Query1"
References: