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

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

3 Replies
sunny_talwar

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
Author

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

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