Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
You can look at doing this using class function: Class Function Example
Alternatively, you can use If statements to create unequal classes or buckets
Hi,
Still can't get it to work, are you able to give me an example?
Thanks
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.
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?
Try with Replace:
Replace(Class(Reading, 0.2), ' <= x < ', ' - ')
or
Replace(Class(Reading, 0.02), ' <= x < ', ' - ')
You are amazing, thanks everyone.
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