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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I
Helper I

add a new column in a table from database

Hello expert users, we all know that not selecting unnecessary columns is a good way to optimize BI performance. But If I need to select 2/3 columns from database and want to join with a table, how to do that?  For example, sales table contains "City key" but I didn't select it. Now I want to select the City key column and join with the sales table. 

Helper I
Helper I



Hi @Greg_Deckler , this is the image of a data model I am working on. The [Dimension City] table contains a column "City key". In order to create a relationship between [Fact sale]  and  [Dimension City], I need to import the column "City key" from original SQL [Fact Sale]. Actually, I didn't select the "City key" column at first. I thought I don't need it. But now I am going need that. How can I bring back the City key column from SQL database in the [Fact Sale column]? I hope I described my problem clearly. I looked for several solutions but nothing came up to my screen.     

Super User
Super User

@Anik Go back to your query and add the City key? Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here:

Also, please see this post regarding How to Get Your Question Answered Quickly:

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

Top Solution Authors
Top Kudoed Authors