For time intelligence in SSAS Tabular models, it’s important to mark a date table. So, how do you do that?
Here are the steps:
1. After you have the data imported in a table, in the model designer, select the date table
2. Also, make sure that necessary relationships are created between date table and fact tables.
3. Now, on the menu bar, select Table > Date > Mark as Date Table
4. A dialog box should ask you for a unique identifier of the date table, so it could be a date column which has the unique columns for the date table that you imported.
Also, make sure that the unique identifier does not have blank values because the model designer will not allow you to select it as your unique identifier and so you may have to go back to your table properties and put a logic to filter out blank values or make sure that the a row with blank value has a value assigned to it.
After you do that, you’re all set to go! I hope this helps.
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:
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
4. Now here click on ‘..’ button after you select the ‘Source Data’ field from the Basic Properties 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’: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!