Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with QlikView Formula

Hi folks,

I am having a hard time trying to implement a formula inside QlikView...

Can I ask for some help?

My data looks like this:  

ColAColB - list of values concatenated by ;
id1string1;string2;string3;string4
id2string1;string4
id3string3;string4

I need to count the total number of times a "string" in ColB appears depending on the selection of ColA.

For example, if all "ids" in ColA are selected, the result would be:

string1 : 2 times

string2 : 1 time

string3 : 2 times

string4 : 3 times

Any ideas?

1 Solution

Accepted Solutions
sunny_talwar

May be like this...

Script

Table:

LOAD * INLINE [

    ColA, ColB

    id1, string1;string2;string3;string4

    id2, string1;string4

    id3, string3;string4

];

LinkTable:

LOAD Distinct ColB,

  SubField(ColB, ';') as List

Resident Table;

Capture.PNG

View solution in original post

3 Replies
sunny_talwar

May be like this...

Script

Table:

LOAD * INLINE [

    ColA, ColB

    id1, string1;string2;string3;string4

    id2, string1;string4

    id3, string3;string4

];

LinkTable:

LOAD Distinct ColB,

  SubField(ColB, ';') as List

Resident Table;

Capture.PNG

Anonymous
Not applicable
Author

If you have limited string, you can write an expression for each string:

=count({<ColB={'*string1*'}>} 1)

Not applicable
Author

Perfect Answer...  !