# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
Contributor II

## Bucketing in bar Chart-Class function

With reference to the example shared by Manish Kachhia in below post    i want to show '0' as a separate dimension. where Age=0 is grouped.

Defining Dynamic Buckets at runtime | Qlik Community

Tags (2)
1 Solution

Accepted Solutions
Highlighted
MVP

## Re: Bucketing in bar Chart-Class function

Try this

=IF(Num(Age)>0,DUAL(Replace(Class(Age,\$(vBucketWIdth)),'<= x <',' - '),Class(Age,\$(vBucketWIdth))+1), Num(0.0000001, '#.'))

7 Replies
Highlighted
Valued Contributor

## Re: Bucketing in bar Chart-Class function

hI Surya

and what about the grouping, do we need to retain that?

Highlighted
Contributor II

## Re: Bucketing in bar Chart-Class function

Yes the grouping needs to be dynamic as its. I just want to add the 0 as dimension apart from the other grouping.

For example if the bucket is 8, currently the distribution is 0-8,8-16,16-24 etc

I want 0,(>0)-8,8-16,16-24..etc

Highlighted
MVP

## Re: Bucketing in bar Chart-Class function

Try this

=IF(Num(Age)>0,DUAL(Replace(Class(Age,\$(vBucketWIdth)),'<= x <',' - '),Class(Age,\$(vBucketWIdth))+1), Num(0.0000001, '#.'))

Highlighted
Contributor II

## Re: Bucketing in bar Chart-Class function

Thanks Sunny. This looks good. I will try to replicate this on my original requirement. Can you please explain this part  Num(0.0000001, '#.')

i was trying with 0 instead in place of Num(0.0000001, '#.')   and what difference does it make.

Highlighted
MVP

## Re: Bucketing in bar Chart-Class function

Not sure why but 0 was not showing up... so I incremented its value by a very small number 0.0000001, but then it showed 0.0000001 in the dimension. So, I used Num() function to show just 0

Highlighted
New Contributor II

## Re: Bucketing in bar Chart-Class function

Is there anyway to do this in QlikSense? We don't have QlikView so I can't download your .qvw and get anything but the xml that is at the trailing end of the file.  However, I can't seem so shoe-horn it into QlikSense.

Highlighted
New Contributor

## Re: Bucketing in bar Chart-Class function

Hi Mate,

Is it possible 0-5, i need starts from 6-10..e.t.c

Is it possible, Please let me know.

Thanks & Regards,

Ravindra Babu G