
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Grouped Values on Bar Chart
Hi everyone,
I know there are many discussions on this subject, but I still can't get it to work.
I have a table that has a field [Results], these can be any values between 0 - 2 to 2 decimal places.
If I want to create a bar chart that counts the number of results between 2 values and groups them as that value?
eg 0.00 - 0.02, 0.02 - 0.04, 0.04 - 0.06 etc
Any Ideas?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Daniel,
You can use the class function to achieve this.
Have a look at the link
https://community.qlik.com/docs/DOC-9195
Regards,
Kaushik Solanki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can look at doing this using class function: Class Function Example
Alternatively, you can use If statements to create unequal classes or buckets

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Still can't get it to work, are you able to give me an example?
Thanks


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Daniel,
As sunny t mentioned you can use the Class function or the Interval match in the script will also solve your problem.
Thanks,
Sangram.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, I have that working now using
Class(([Reading]),0.2)
However, how do I then get the label to ready 0.00 - 0.02 etc?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try with Replace:
Replace(Class(Reading, 0.2), ' <= x < ', ' - ')
or
Replace(Class(Reading, 0.02), ' <= x < ', ' - ')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are amazing, thanks everyone.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you got what you were looking for, would you mind closing this thread down by marking correct and helpful answers.
Qlik Community Tip: Marking Replies as Correct or Helpful
Thanks,
Sunny
