Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bar chart with bucket, two dimensions, and one expression

Hi all,

I have a question that I think involves IntervalMatch for two separate types of counts of objects, but I'm not sure.  Any suggestions or tips would be great!

I need to create a grouped bar chart that has two sets of bars - one for a bucket for a count of items between 0 and 5, and a second bucket for a count of items between 6 and 10.  I need to count two different types of items (a count of all serial numbers and a count of activated serial numbers).  Then I total the number of companies for each of these two metrics.  I imagine the chart will have four bars, grouped in twos.  Group 1 will represent 0-5 for both metrics, and Group 2 will represent 6-10 for both metrics.  Metric 1 will be Color1 and Metric 2 will be color 2, in both groups of bars.  The expression is a count of companies that have a total of all serial numbers and activated serial numbers in that bucket.

Hopefully that makes at least some sense.  I'm attaching a mock-up in Excel to help explain what I am visualizing and understand I am being asked for.

Thanks!

Robin

14 Replies
Not applicable
Author

From what I understand from the user providing requirements, the buckets are actually "less than 5" and "more than 5", so I think the answer is no, I don't expect any additional buckets.  You were wondering whether using class() would be necessary maybe? 

Not applicable
Author

Hey, that looks great!  As I mentioned above, the only other small piece of info I need to mention is that the user would like to see only two buckets - basically "less than 5" and "more than 5", rather than buckets that are increments of five.  Would that be possible, do you think?

Thank you so much!

Not applicable
Author

Ofcourse, and even easier

MarcoWedel

Hi,

looks very good.

One suggestion to simplify the script though:

tabSNs:

CrossTable(SNType, #SNs)

LOAD Institution,

    [# Total SNs] as Total,

    [# Activated SNs] as Activated

FROM [http://community.qlik.com/thread/115527]

(html, codepage is 1252, embedded labels, table is @2);

regards

Marco

Not applicable
Author

Thank you both so much!  I have what I need now!  I very much appreciate the help!

Best regards,

Robin