Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
subbareddykm
Creator II
Creator II

ranage count

Hi all,

I m facing one issue,

i want to get out like below in front end, is it possible ?

BUCKET.JPG

6 Replies
sunny_talwar

Please find attached

Capture.PNG

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)

Chanty4u
MVP
MVP

if(amount='<100',b1,if(amount='<130',b2,if(amount='<150',b3,if(amount='>150',b3,

))) as newbucket,

Gysbert_Wassenaar

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)


talk is cheap, supply exceeds demand
subbareddykm
Creator II
Creator II
Author

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 ?

Digvijay_Singh

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)

sunny_talwar

Then try as other's are suggesting, do the Bucket calculation in the script.