Unix Technical Forum

Sorting Negative Account Age Dimension

This is a discussion on Sorting Negative Account Age Dimension within the SQL Server Data Warehousing forums, part of the Microsoft SQL Server category; --> I am trying to sort a dimension based upon account age. Due to activity occuring before an account is ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server Data Warehousing

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:38 PM
=?Utf-8?B?QnJlbnQgQnJhZGxleQ==?=
 
Posts: n/a
Default Sorting Negative Account Age Dimension

I am trying to sort a dimension based upon account age. Due to activity
occuring before an account is considered active, I have negative values. I
need to display these negative values in this dimension, however, negatives
are not sorted correctly. Sorts occur from left to right ignoring the sign.
Consequently, I am left with 001, -001, 002, -002.

Is there anyway to have this data sort like it was numeric?

Thanks!
--
Brent Bradley
Senior DBA/Analyst

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:38 PM
=?Utf-8?B?V29yZCAyMDAzIG1lbW9yeSBMZWFrYWdl?=
 
Posts: n/a
Default RE: Sorting Negative Account Age Dimension

you can convert that field to numberic if sorting works for numberic?

"Brent Bradley" wrote:

> I am trying to sort a dimension based upon account age. Due to activity
> occuring before an account is considered active, I have negative values. I
> need to display these negative values in this dimension, however, negatives
> are not sorted correctly. Sorts occur from left to right ignoring the sign.
> Consequently, I am left with 001, -001, 002, -002.
>
> Is there anyway to have this data sort like it was numeric?
>
> Thanks!
> --
> Brent Bradley
> Senior DBA/Analyst
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 07:38 PM
Darren Gosbell
 
Posts: n/a
Default Re: Sorting Negative Account Age Dimension

If your key column is numeric, as in the example you have shown, make
sure that the data type for the key is set to a numeric type and that
the sort order is set to use the key. (These properties are in the
advanced tab for the level).

If the key field is not numeric, you can create a numeric column in your
dimension table, add it as a member property for the level and the
change the "order by" property to use the member property for ordering.

--
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:13 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com