Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
this is the situation, i've a table like this
id | in | out | result |
---|---|---|---|
a | 14 | 11 | 3 |
b | 17 | 23 | -6 |
c | 86 | 56 | 30 |
d | 43 | 32 | 11 |
this is the load script:
LOAD id,
in,
out
FROM ....
and result = in - out
Now i'd like a filter where i can group the result value, for example:
result < 0
result > 0 and result < 10
result > 10 and result < 20
result > 20 and resul < 30
so i can filter only the values that i want.
Can i create a filter on the calculated field "result"?
it's going with Intervallmatch()
Greetings gerry
try this:
if ( in - out< 0,'result < 0',if(in - out> 0 and in - out< 10, 'result > 0 and result < 10', if(in - out> 10 and in - out< 20,'result > 10 and result < 20',if(in - out> 20 and in - out< 30,'result > 20 and result < 30')))) as Result status
Look here
I can't use Intervallmatch() because i create the result field with Straight Table and not on load
maybe something like
Class(YourStraightTableResultExpression, 10)
hope this helps
regards
Marco
Try this...
Load *, IF(result<0, 'lesthan0',
IF(result>0 and result<=10, '0-10',
IF(result>10 and result<=20, '11-20',
IF(result>20 and result<=30, '21-30')))) as ResultBucket;
LOAD * INLINE [
id, in, out, result
a, 14, 11, 3
b, 17, 23, -6
c, 86, 56, 30
d, 43, 32, 11
];
try this:
LOAD*,
in-out as result;
LOAD * INLINE [
id, in, out
a, 5, 3
b, 22, 4
c, 6, 7
d, 8, 4
e, 19, 6
f, 7, 8
];
take a list box an write a below expression in the field <exp>
=if(result<0,'result<0',if((result > 0 and result < 10),'result>0 and result<10',if((result>10 and result<20) ,'result > 10 and result < 20','result>20')))
May be like this?
Hi Andrea,
Try this as an expression in a listbox:
=Aggr('<=' & 10*Ceil((in-out)/10),id)
Cheers
Andrew