Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Re: Grouped Values on Bar Chart

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

Re: Grouped Values on Bar Chart

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

Re: Grouped Values on Bar Chart

Hi,

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

Thanks

reddys310
Honored Contributor II

Re: Grouped Values on Bar Chart

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

Re: Grouped Values on Bar Chart

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?

Re: Grouped Values on Bar Chart

Try with Replace:

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

or

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

Not applicable

Re: Grouped Values on Bar Chart

You are amazing, thanks everyone.

Re: Grouped Values on Bar Chart

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

Community Browser