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

Need to do buckting and Cummulative on top of it

HI

I have only one column "data" as below.

data

0

2

10

20

30

100

110

200

I need to create bucketon this as,

<0

0-10

10-100

100 - 200

and i need to get cummaltive sum of data based on this bucketing

Bucket            Cummulative sum

<0                               0

0-10                            12

10-100                        162

100 - 200                    472

Can anyone please suggest on this

1 Solution

Accepted Solutions
siddharth_s3
Partner - Creator II
Partner - Creator II

Make a dimension in the script:

IF(Data<0, '<0',

IF(Data<10, '0-10',

IF(Data<100, '11-100',

IF(Data<200, '101-200',))) as Bucket

Then create a graph with Bucket as dimension & COUNT(Bucket) as Measure

View solution in original post

4 Replies
siddharth_s3
Partner - Creator II
Partner - Creator II

Make a dimension in the script:

IF(Data<0, '<0',

IF(Data<10, '0-10',

IF(Data<100, '11-100',

IF(Data<200, '101-200',))) as Bucket

Then create a graph with Bucket as dimension & COUNT(Bucket) as Measure

Anonymous
Not applicable
Author

how can I sort it as to get  always

<0

0-10

10-100

100 - 200

siddharth_s3
Partner - Creator II
Partner - Creator II

Select sort by expression and put the below formula:

=match(Bucket,'<0','0-10,'11-100' ,'101-200')

Anonymous
Not applicable
Author

Thank You, it worked