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

Stacked Bar Chart Based on Field Count

I'm trying to make a somewhat complex Stacked Bar Chart. Each stack in the chart should be based on how many times a certain field occurs within that time period. I have the period as my dimension. I have built similar charts by hardcoding expressions for each "Stack" in the chart.

Ie. I could have three stack's by making three expressions:

     Stack 1: (sum(if(Area = 'Chicago', 1, 0))

     Stack 2: (sum(if(Area = 'New York', 1, 0))

     Stack 3: (sum(if(Area = 'Atlanta', 1, 0))

In this example I am using Area as my field. The problem I have is that I have about 500 possible 'Area's'. Do I have to make 500 expressions for each possible option? I really just want the top 20 occuring Area's displayed on the chart. Is there a way to count / display just the top occuring area's? How do I do this?

Thanks a lot for your help

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

Use Area as dimension and then use dimension limits (is the second sheet in the properties of the object) to limnit first 20 values ...

Hope it helps

View solution in original post

2 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Use Area as dimension and then use dimension limits (is the second sheet in the properties of the object) to limnit first 20 values ...

Hope it helps

Not applicable
Author

That works. Thanks.