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?
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.
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
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. ;
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.