Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stacked charts with filtering

Hi everyone,

I am new to Qlik Sense. I am trying to build a stacked bar char on line chart over a table of categorized data. I want to show the data stacked based on category.

I have added a measure for each category with the following expression:

Sum({<Category = {"CAT_A"}>} Cost)

I also have a table next to my chart which has list of all categories. When I click on specific category in my table, I want to filter out all other categories in may chart and only show the selected category, but my stacked line chart does not respond to my selection, and I could not figure out how to fix it. I appreciate if someone could point me to a direction?

1 Solution

Accepted Solutions
OmarBenSalem

I'll assume that you CAT dimension is named Category.

Here's what you do:

Use a line chart (presentation > use zone)

keep your time dimension

Add another dimension: Category

as a measure: Only have 1 measure: Sum(Cost)

When you filter with a CAT you'll only have the stacked CATs.

Per analogy in the example below:

Dimension 1: Year

Dimension 2 : Region

Measure: sum(carSales)

Filter: Region

Result:

Capture.PNG

View solution in original post

6 Replies
OmarBenSalem

Can you provide a sample QVF app to work with? or at least an image?

And what dimension you're using?

and how many measures?

Not applicable
Author

Dimension is time, "billing period" to be more accurate. And I have about 25 measures (categories). I have not plot them all yet, because I figured out my approach is not working.

Let me see if I can provide you with an image.

Not applicable
Author

SampleChart.JPG

Here is an image. I want to only show CAT A when I click on CAT A on the left hand side table.

OmarBenSalem

I'll assume that you CAT dimension is named Category.

Here's what you do:

Use a line chart (presentation > use zone)

keep your time dimension

Add another dimension: Category

as a measure: Only have 1 measure: Sum(Cost)

When you filter with a CAT you'll only have the stacked CATs.

Per analogy in the example below:

Dimension 1: Year

Dimension 2 : Region

Measure: sum(carSales)

Filter: Region

Result:

Capture.PNG

Not applicable
Author

Thanks a lot. It worked

OmarBenSalem

Great to hear !

don't forget to close the thread by marking the correct answer as so.

Have nice days