Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin 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.
I am appending several queries eg:
query A
query B
query C
I want to create a custom column in the append result query that will display the source query name the record was from eg:
Append results:
fruit qty source query
apple 23 query A
pear 4 query A
orange 33 query B
grapefruit 4 query B
....and so on
Solved! Go to Solution.
You may change code in The Advanced Editor.
Source = Table.Combine({Table.AddColumn(#"query A", "source query", each "query A") , Table.AddColumn(#"query B", "source query", each "query B") , Table.AddColumn(#"query C", "source query", each "query C")})
Thank you, the problem was soluted
There is a workaround using #sections now!
This is nice but, what if I have like 100 tables I need to append? How can we make this code dynamic so that it gets the table name for each row?
You may change code in The Advanced Editor.
Source = Table.Combine({Table.AddColumn(#"query A", "source query", each "query A") , Table.AddColumn(#"query B", "source query", each "query B") , Table.AddColumn(#"query C", "source query", each "query C")})
Not pretty, but it worked, thank you.
This really should be a built-in function, it would make the append query much more useful.
Thanks a lot for this. It came in very handy. I needed to combine 72 Tables for cleaning. It worked well.
Wonderful solution, thank you! Came in very handy in my work today.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
62 | |
61 | |
55 | |
38 | |
27 |
User | Count |
---|---|
83 | |
61 | |
45 | |
41 | |
39 |