Home > Archive > MS SQL Data Warehousing > October 2005 > Sorting Negative Account Age Dimension









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Sorting Negative Account Age Dimension
Brent Bradley

2005-10-17, 1:24 pm

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

Word 2003 memory Leakage

2005-10-20, 8:24 pm

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
>

Darren Gosbell

2005-10-20, 8:24 pm

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_do
t_com>
Blog: http://www.geekswithblogs.net/darrengosbell
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com