Author |
Topic  |
|
sefer
Germany
105 Posts |
Posted - 05/19/2006 : 11:08:27
|
Hi,
i try to create a named calculation in AS2005. My problem is, that i need a weekdayname-colum which is sorted by key and not alphabetical.
1.)At first i tried this: name:MY_Datename formula: datename(dw,My_Date) RP:That shows me the dateNAMES, but sorted alphabetical.
If i try to change the OrderBy Attribut to Key it doesnt take an effect in Report Portal, but in AS2005 Browser it is sorted correctly(like my wish).
2.)At second i tried this: name:MY_Datepart formula: datepart(dw,My_Date) RP:That shows me the DateKEYS, sorted by key, but without NAMES.
3.)Finally, i solved it so, but that is not perfect, there must be an easier way, or not?
name: MY_Weekday
formula: --------------------------- CASE datepart(dw,My_Date) WHEN '1' THEN '1-MO' WHEN '2' THEN '2-DI' WHEN '3' THEN '3-MI' WHEN '4' THEN '4-DO' WHEN '5' THEN '5-FR' WHEN '6' THEN '6-SA' WHEN '7' THEN '7-SO' END --------------------------- That shows me what i want, only that the numbers are also shown.
Any hint, how to solve this in RP?
thank you Sefer
|
|
admin
1644 Posts |
Posted - 05/20/2006 : 19:30:06
|
It is Analysis Services that does the sorting. ReportPortal only renders the data. You can see this by taking the MDX out of ReportPortal and running it in SQL Server Management Studio.
Generally, it seems that you are on the right track and changing OrderBy Attribute to Key should help.
|
 |
|
sefer
Germany
105 Posts |
Posted - 05/21/2006 : 00:26:20
|
thx,
i will try it. Sefer |
 |
|
|
Topic  |
|
|
|