02-26-2014 05:28 AM
Hi all, another sorting order problem!
I have the following setup:
Cube -> Infomap -> Web Reaport
I have a dimension level "ID and color" (character format) that has values like:
I would like to have them in the order above, instead i get the following order when choosing acending sort order in the report:
Is there any character format that can sort theese kind of values in a numerical way? Or is there any way to do this with a user written format in the cube or some trick in the infomap?
02-26-2014 06:42 AM
Create a new variable with the ritgh order. order by it.
In the wrs not order but with the order given by the infomap. or use tha variable just for the order. If you do for just one varaible could be onest
Another way cam be a format with the righ order and order by format on the infomatp but showing no format at all on the WRS.
You should ask if is possible to order in a 'custom way' and I dont't if is possible.
03-04-2014 02:45 AM
Actually I can't mess with the data order in the source readed into the cube (oracle table).
The dimension values are actually the following (as characters):
'1', '10', '11', '2', '20'.... about 900 different values.
Is it possible to convert theese to numerical in the cube?
If not, is it possible to set a fix length and inserting zeroes for the values with less then 3 characters?
If not, I have a field with values 'blabla001', 'blabla010', 'blabla002'... is there a format that only takes the last 3 positions in a character field?
really messy situation I know
03-04-2014 04:12 AM
trasform the variable char with the '1' '2' .. '100' in numeric and appaly the formmat zn. (n it,2 the max number og digit, see the format z. on the documentation) so that it's shown as '001' '002' ... '100'
03-08-2014 03:56 AM
The source data to the cube is in oracle and I can´t sort it there. Where could I use the proc sort funcion for a specific level in a dimension, in the cube or infomap?
03-08-2014 11:15 AM
You mentioned that you cannot modify the source (or at least not easily) since it is in Oracle tables.
You might try creating a format and then applying the format to the field. Then you can sort by the formatted value. That is actually the default behavior in PROC REPORT.
data have ;
input color $quote20. ;
data want ;
set have ;
fmtname = 'color';
type = 'C';
start = color ;
label = catx(' ',put(input(scan(color,1,' '),5.),Z3.),scan(color,2,' '));
proc format cntlin=want ;
proc report data=have ;
column color ;
format color $color. ;