Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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?

8 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sunny_talwar

You can look at doing this using class function: Class Function Example

Alternatively, you can use If statements to create unequal classes or buckets

Not applicable
Author

Hi,

Still can't get it to work, are you able to give me an example?

Thanks

reddy-s
Master II
Master II

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.

Not applicable
Author

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?

sunny_talwar

Try with Replace:

Replace(Class(Reading, 0.2), ' <= x < ', ' - ')

or

Replace(Class(Reading, 0.02), ' <= x < ', ' - ')

Not applicable
Author

You are amazing, thanks everyone.

sunny_talwar

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