How to add a column in an imported Table while developing SQL Server 2012 Analysis services Tabular Model

Standard

Do not get intimidated by the long title – it’s not as complex as it sounds! So what am i talking about? Recently, I was developing SQL Server 2012 analysis services Tabular Model (referred to as ‘model’ from now on) and during development I realized that I need to import a column for a table. Let me give an example of what I am talking about:

Consider In the data source there’s a table named ‘Date’ with 15 columns, But for the model I needed only few columns – So I imported only 5 (out of 15) columns from this table:

DateKey
EnglishMonthName
MonthNumberOfyear
CalendarQuarter
CalendarYear

Now During development I figured I need one more column which I had not imported before. Let’s call it FullDateAlternateKey

So How do you add the column ‘FullDateAlternateKey’ in your model during development?

Turns out, It is very simple. This is how you do it:

1. Select the Table in your model designer
2. Go to Table properties.
(If you are not able to see the properties window. Go to View > Properties Windows OR Just select the table and press F4)
3. This is how a properties windows for a Table looks like

properties windows table sql server 2012 tabular mode analyis services

4. Now here click on ‘..’ button after you select the ‘Source Data’ field from the Basic Properties
Source Data edit table sql server 2012 tabular mode analyis services
5. You’ll see a ‘Edit Table Properties’ dialog box. Here you check the column that you wish you import to the model. In my case, I checked the box for the column ‘FullDateAlternateKey’:analysis services check the box for column to be imported 6. Click on OK.

Allow it few seconds and you would see the column in your table! Didn’t I tell you – It’s very simple!

That’s about it for this post. So next time, You need to import a column while developing the model, do not worry – it’s just couple of clicks. But, Even though I was able to add a column later, I had to look at the relationships – create one relationship – make sure other things were right. In short – It was more work. So it’s better that you select the columns that you want in the first place. But If the need arises, you can always add columns (and even remove them) via Table properties. I hope it was helpful!

 

Advertisements

One thought on “How to add a column in an imported Table while developing SQL Server 2012 Analysis services Tabular Model

Thank this author by sharing the article on social media. If you have any questions or comments, please leave a reply below:

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s