Thursday, 5 September 2013

Sort Month in chronological order in SSAS 2012 Calendar Hierarchy

Hello Friends,

   Today we are going to look at how to sort the months in the correct order in the hierarchy created in the Time Dimension. The Hierarchy currently displays output in the following format. Take a look.




The months in 1st quarter of the year 2005 are appearing in the alphabetical order instead of chronological order. i.e. January, February, March. How do we resolve this?

Well the solution for this is:
1.     Double click on Time Dimension from the Solution Explorer
2.     Select the Dimension Structure tab
3.     From the attributes pane, select Month Attribute
4.     Press F4 to lauch the Properties Window
5.     Select KeyColumns Property
6.     Click on the ellipses button next to it
7.     Add following Columns: MonthNumberOfYear, Calendar Year, EnglishMonthName
8.     Select NameColumn Propety
9.     Click on the ellipses button next to it
10. Select EnglishMonthName attribute
11. Click on OK
12. Set AttributeHierarchyOrdered property to True
13. Save the project and deploy
14. Click on the Browser tab
15. Select Calendar Hierarchy
16. Expland All
17. Then expand the year 2005
18. Then expand the semester 1
19. Then expand the quarter 1
20. Observe the months are sorted in Chronological Order
Here is the screenshot.