Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
zulfikar_syed
Contributor II
Contributor II

Count Same Values from Two Columns

I am trying to Count Values from two Columns in Table-1 and have to display in a chart as Table-2

Annotation 2020-01-28 234026.png

 

 

 

 

 

 

 

 

 

 

Association of Characters with IN or OUT is not working for me.

Is there any other-way through Set-Analysis to obtain the output as shown in the second table.

Chart function is highly appreciated.

 

Regards,

1 Solution

Accepted Solutions
jberna26
Partner - Contributor III
Partner - Contributor III

Hi @zulfikar_syed ,

 

Not sure if it’s the ideal solution, but you could use a ValueList for the dimension:

Valuelist(‘A’,‘B’,’C’,’D’)

and in the expression for the Count In:

Pick(Match(Valuelist(‘A’,‘B’,’C’,’D’),‘A’,‘B’,’C’,’D’),

Count({<IN={‘A’}>}ID),

Count({<IN={‘B’}>}ID),

Count({<IN={‘C’}>}ID),

Count({<IN={‘D’}>}ID)

)

and for the out, change the Set Analysis accordingly. 

I haven’t done this in a long time, so not completely sure it will work, and it is a dirty solution. 

Hope it helps 😉

 

Regards

View solution in original post

3 Replies
jberna26
Partner - Contributor III
Partner - Contributor III

Hi @zulfikar_syed ,

 

Not sure if it’s the ideal solution, but you could use a ValueList for the dimension:

Valuelist(‘A’,‘B’,’C’,’D’)

and in the expression for the Count In:

Pick(Match(Valuelist(‘A’,‘B’,’C’,’D’),‘A’,‘B’,’C’,’D’),

Count({<IN={‘A’}>}ID),

Count({<IN={‘B’}>}ID),

Count({<IN={‘C’}>}ID),

Count({<IN={‘D’}>}ID)

)

and for the out, change the Set Analysis accordingly. 

I haven’t done this in a long time, so not completely sure it will work, and it is a dirty solution. 

Hope it helps 😉

 

Regards

jberna26
Partner - Contributor III
Partner - Contributor III

Hey @zulfikar_syed ,

 

Did it work?

If so mark the answer as SOLVED.

 

Thank you 😉

zulfikar_syed
Contributor II
Contributor II
Author

hi @jberna26 , Thank you for the solution.. I apologize for this late reply.. Currently I am working on your solution, as my chart has more than one dimension in the same table and More values in the ValueList. Please give me some time as I am implementing it and will mark as solution once I tested. I am sure this is the only solution.

I appreciate your help and I promise I will mark your reply as a solution once I tested it. And I will also post a reply if there is any other alternate work around for this problem..

Regards,