Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

manigunta
Contributor

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
Contributor

Re: Need to do buckting and Cummulative on top of it

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

4 Replies
siddharth_s3
Contributor

Re: Need to do buckting and Cummulative on top of it

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

manigunta
Contributor

Re: Need to do buckting and Cummulative on top of it

how can I sort it as to get  always

<0

0-10

10-100

100 - 200

siddharth_s3
Contributor

Re: Need to do buckting and Cummulative on top of it

Select sort by expression and put the below formula:

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

manigunta
Contributor

Re: Need to do buckting and Cummulative on top of it

Thank You, it worked

Community Browser