Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hi there ~ I am pulling data from multiple datasources. How can I add a column that shows the datasource, such as the SQL Server and the Database name?
Solved! Go to Solution.
Hi Susan,
it won't pull the names, but PQ doesnot support "unanimous" datasources. Even if you load them dynamically, you know at any point in time what are they, right?
From this perspective, this is "add column" with either "static" name (which you can enter manually as this is hardcoded in the query) or "dynamic" (which you can add as part of the query, assiging it to a variable/step and using it as the Table.AddColumn statement.
Cheers,
John
Hi,
If the sources are few you can add a custom column with the name of the source.
Add Column --> Custom Column --> Name the column as "Source" and then give the source name for example "SQL" with the double quotes as it's text.
If I replied to your question please consider to close the question
Thank you, but I do not see how that will pull in the name of the SQL Server or Database where the data is coming from...?
Hi Susan,
it won't pull the names, but PQ doesnot support "unanimous" datasources. Even if you load them dynamically, you know at any point in time what are they, right?
From this perspective, this is "add column" with either "static" name (which you can enter manually as this is hardcoded in the query) or "dynamic" (which you can add as part of the query, assiging it to a variable/step and using it as the Table.AddColumn statement.
Cheers,
John
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
8 | |
6 | |
6 | |
6 | |
5 |
User | Count |
---|---|
9 | |
9 | |
8 | |
6 | |
6 |