Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
suryaa30
Creator II
Creator 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

1 Solution

Accepted Solutions
sunny_talwar

Try this

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

Capture.PNG

View solution in original post

7 Replies
prat1507
Specialist
Specialist

hI Surya

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

suryaa30
Creator II
Creator II
Author

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

sunny_talwar

Try this

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

Capture.PNG

suryaa30
Creator II
Creator II
Author

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.

sunny_talwar

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

asheppardwork
Contributor III
Contributor III

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.

Ravindra1
Contributor
Contributor

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