Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I m facing one issue,
i want to get out like below in front end, is it possible ?
Please find attached
Dimension:
=If(AMT < 100, Dual('0-100', 1),
If(AMT < 130, Dual('100-130', 2),
If(AMT < 150, Dual('130-150', 3), Dual('>150', 4))))
Expression:
=Count(Name)
if(amount='<100',b1,if(amount='<130',b2,if(amount='<150',b3,if(amount='>150',b3,
))) as newbucket,
Yes, that's possible. Create a calculated dimension:
=If(AMT<=100, '0-100', If(AMT<=130, '101-130',If(AMT<=150,'131-150','>150')))
And use as expression =count(distinct Name)
Sunny,
Its giving correct output, But my requirement , my expression have more thn 10 line of set expression , i can't put that expression as a dimension, right ?
Try like this -
Load *,
If(AMT<100,'0-100',
If(AMT>100 and AMT<130,'100-130',
If(AMT>130 and AMT<150,'130-150',
If(AMT>150,'>150')))) as Bucket;
Load * inline [
Name AMT
A 87
B 147
C 149
D 93
E 132
F 111
G 162
H 116
I 108
J 173
K 134
L 176
M 181 ](delimiter is spaces);
Dimension - Bucket
Expression - Count(Bucket)
Then try as other's are suggesting, do the Bucket calculation in the script.