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: 
igdrazil
Creator III
Creator III

Intersection Bar Chart

Hi Community,

I want to create a Bar chart with 2 Bars, 1 shows me a distinct number of articles sold in a specific month (Jan - Dec). Now i want a second bar that shows the number of articles sold in e.g. Dec and Jan, which would be placed on Jan. On Feb i want a bar that shows Intersection of articles of Jan and Feb and so on!

I hope this explanation gives a good view of what i want.

Thanks in advance!

Regards

Chris

1 Solution

Accepted Solutions
tresesco
MVP
MVP

If you want in front -end you could try expression like:

Count(If(SubStringCount(Aggr( NODISTINCT Above(Concat(Product,';')), Month), Product)>0, Product))

PFA

View solution in original post

15 Replies
Not applicable

can u give me example on this..to understand req good

tresesco
MVP
MVP

Yes it gives a view, however, it would be even better if you could share a sample qvw explaining the expected output.

igdrazil
Creator III
Creator III
Author

So i say we sold in Jan article           a, b, c, d

in Feb we sold                                 b,c,e

Bar1 shows on Jan: count = 4;  on Feb count = 3

Bar2 shows on Jan: count = 0 (because we have no data on Dec); and on Feb count = 2 (because there are 2 overlapping articles)

Hope this gives you further explanations

Regards

Chris

tresesco
MVP
MVP

May be like this sample?

igdrazil
Creator III
Creator III
Author

I'm working in Qlik Sense, so i'll not get any visualization in this... do you have a .qvf file for me?

Regards

Chris

igdrazil
Creator III
Creator III
Author

I am able to do this whole thing in a KPI where i have a specific month given, but i can't make it work in a Bar Chart, cause of the Dimension given from it.

Formula for KPI:

count({$<Month={$(vMonth1)}>}Distinct ArticleSold)

+ count({$<Month={$(vMonth2)}>}Distinct ArticleSold)

- count({$<Month={$(vMonth2), $(vMonth1)}>}Distinct ArticleSold)

Regards

Chris

tresesco
MVP
MVP

PFA

tresesco
MVP
MVP

This doesn't work in chart, because your comparison in set analysis works outside chart and not row-wise.

igdrazil
Creator III
Creator III
Author

Yes, i know that. That's why i'm asking here for help. I posted this formula, only for interest or more ideas

Regards

Chris