0

Let's say I have a simple hierarchy of Date dimension: Year - Month - Day.

As it is known the the Month has to have the keycolumns the month and the year. It would be a collection. Otherwise if it had only the month wouldn't work. For more info about that check this.

Now my question is:

When the orderby property is set to key, How does it know what key to get? There are two columns in the keycolumns property. How does it know it has to sort on the month number? What does the year column play in all this?

elvainch
  • 1,369
  • 3
  • 15
  • 32
  • think of the keys as a concatenation os both keys and order them.. 201601,201602 and so on... – mxix Jun 20 '16 at 15:37
  • and which one goes first? How do I tell analysis services to put the year before the month? – elvainch Jun 21 '16 at 08:13

1 Answers1

0

When you go to KeyColumns press (...), will pop-up a modal windows with the columns you can select. Just select both columns by the order you want from Top to Bottom.

Example

mxix
  • 3,539
  • 1
  • 16
  • 23
  • Thinking about it, if you are inside a hierarchy, the parent would be the same for all the children so when comparing, it will only compare the children values to order them, since the top level value(the parent) is the same. Following the example you put, all the cities in the same state will have the same state parent, so it will compare the city name only right? If so, how you put the order of the columns wouldnt matter? Im talking here ONLY for ordering values purposes. – elvainch Jun 23 '16 at 09:37
  • The ordering does matter if you want to order the attribute by Key. If you select Year-> Month OR Month->Year, when displaying that attribute it will order the members differently. If you order by something else, the order should not matter. – mxix Jun 23 '16 at 12:53
  • Can you give an example, I dont get it why would matter in a Year->Month hierarchy? – elvainch Jun 25 '16 at 16:16