Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Histogram containing multiple subsets

Hello all,

I would like to visualize data containing specific & repeated values

CustomerCategory
C1AB
C2B
C3AB
C4C
C5ABC

The expected result is a histogram with the folowing data:

A => 3 customers (C1, C3 and C5)

B=> 4 customers

C=> 2 customers

I would like this histogram to have selectable fields  in order to filter the data easily.

Functions like "valuelist" doesn't work because it is not possible to filter the data. It might be possible with new independent set of data but I don't know how to implement them.

This is a quite simple request but I didn't found any solution yet

Many thanks in advance,

NM

Tags (3)
3 Replies
sunny_talwar
Not applicable

Re: Histogram containing multiple subsets

Do you have a character between individual category? Assuming that character is ;, you can try this

Table:

LOAD * INLINE [

    Customer, Category

    C1, A;B

    C2, B

    C3, A;B

    C4, C

    C5, A;B;C

];

LinkTable:

LOAD Distinct Category,

  SubField(Category, ';') as Category_Selection

Resident Table;

Capture.PNG

Not applicable

Re: Histogram containing multiple subsets

This is a very good idea Sunny, many thanks.

however, there is no such character in the data set.

Any other proposal?

If not, I would modify the original data according to your solution but it would be better if there is another solution.

sunny_talwar
Not applicable

Re: Histogram containing multiple subsets

If category is only ever going to be a single digit thing, then may be this

Table:

LOAD * INLINE [

    Customer, Category

    C1, AB

    C2, B

    C3, AB

    C4, C

    C5, ABC

];

LinkTable:

LOAD Distinct Category,

  Mid(Category, IterNo(), 1) as Category_Selection

Resident Table

While IterNo() <= Len(Category);


Capture.PNG