Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have a variable with this values.
'260 <= X < 440','440 <= X < 620','80 <= X < 260','-100 <= X < 80','80 <= X < 260','260 <= X < 440','440 <= X < 620','620 <= X < 800'
I need to sort this values and store in the variable as follows:
'-100 <= X < 80','80 <= X < 260','260 <= X < 440','440 <= X < 620','620 <= X < 800'
How to sort the buckets. please help.
You may use a Inline table to assign a numerical value to each value, and then on the graphics, use the sort by expression and use the field "SortOrder" . Finally, let the associative model do the rest:
// Create a table for the ranges
RangeNumerical:
Mapping LOAD * INLINE [
Range, SortOrder
'-100 <= X <= 80', 1
'80 < X <= 260', 2
'260 <= X <= 440', 3
'440 < X <= 620', 4
'620 <= X <= 800', 5
];
Hi Julian,
I am creating the bucket in the front end expression. it is dynamic and can not be loaded in backend.
What expression are you using to create the bucket?
-Rob
I am using the Class fucntion:
class(aggr(SW_CONTRIBUTION_PER_TEU,L2),
(fabs(floor(min(total aggr(SW_CONTRIBUTION_PER_TEU,L2)),100))
+
fabs(ceil(max(total aggr(SW_CONTRIBUTION_PER_TEU,L2)),100))
)/5
,
'X',
floor(min(total aggr(SW_CONTRIBUTION_PER_TEU,L2)),100)
)
You mentioned a "variable" that contains the class buckets. Are you creating this value with Concat() or something else? The class function you posted would create a Dimension. Sorting the Dimension numeric would give the corrected sort display in a chart. If you are trying to put all the class labels in a single string, can you post that expression?
-Rob