TechBubbles Microsoft Technology BLOG

Sorting Month Name in Date Dimension in SQL Server

 

In order to sort the month name in your date dimension, you need to define an attribute relationship and Sort Order in the Date Dimension. This post discusses about defining a new attribute in date dimension based on existing column in the underlying dimension table.

Step 1: Open the Date Dimension designer then switch to Attribute Relationships tab

image

Right Click on the Month Name attribute and create a new attribute relationship as shown above

Step 2: In Create Attribute Relationship dialogue box, Source Attribute name is Month Name and set the Related Attribute to Month number

image

Click ok to close the dialogue box.

Step 3 – Click the Dimension Structure tab, Right click on month name attribute as shown below and click properties option

image

Step 4 –

Change the order by property to Attribute key and change the Order by Value of the attribute to Month

image

Now Build and deploy the dimension, when deployment has successfully completed, Switch to browser tab for date dimension and you will see the result as below

image

Share this post :

About the author

Kalyan Bandarupalli

My name is kalyan, I am a software architect and builds the applications using Microsoft .NET technologies. Here I am trying to share what I feel and what I think with whoever comes along wandering to Internet home of mine.I hope that this page and its contents will speak for me and that is the reason I am not going to say anything specially about my self here.

1 Comment

TechBubbles Microsoft Technology BLOG

Follow me

Archives

Tag Cloud