Techbubbles

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 :





Related Posts:

%d bloggers like this: