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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Susan585
New Member

How to add a column showing datasource

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?

1 ACCEPTED 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  

View solution in original post

3 REPLIES 3
AKNiang
Frequent Visitor

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  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors