Friday, February 24, 2012

Date dimension Sort order

We created Time Dimension from Dimension Wizard , the months default sort by alphabetically, I try to set ‘order by attributeName’ in BI Studio, but ‘OrderByAttribute’ from Properties is an empty dropdown box and can not enter the word.

What I'm doing wrong?

Thanks.
In Time Dimension created from Dimension Wizard, there is a month_name attribute which is sorted by alphabetically 'April, August...', and another attribute month_of_year_name. I want to display month_name, but order by 'month_of_year_name', how can I do this? or has another way to sort month name?

Any idea?

Thanks in advance.
|||

To solve this problem you will have to add a second column for the month number in the data source view.

Use the TSQL function DatePart() for this.

Use this month number as the key column and the month name as the name column in the properties pane for the attribute.

For the month number you will have to add year in the key as a collection because a month number(1-12) is not unique over years.

This is also found in the properties for the month attribute.

SSAS2005 sorts by key as a default so this should work.

HTH

Thomas Ivarsson

|||Great! It works.

Thank you very much Thomas for the help.

No comments:

Post a Comment