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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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 > |
| ||||
| 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 |