Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
qliker3
Creator
Creator

Count only if a column is selected

I have a bar chart and I have some columns:  fSnr, lSnr and cSnr. 

I’m doing count(if(fSnr and lSnr and cSnr, fSnr )) to count the values for each date.

Additionally, I have a table with columns which are named 'f', 'l', 'c' and a data island columnnames ('f', 'l', 'c') in which you can select which columns in the table should be shown. 

I want the bar chart to count the values only if they are selected in the columnnames. 

What I tried: 

Dimention: date

Measure:

count(

if(
if(columnnames = 'f' and fSnr, fSnr) and
if(columnnames = 'l' and lSnr, lSnr) and
if(columnnames = 'c' and cSnr, cSnr),

fSnr))

but this doesn’t work. Please help me with fixing this

3 Replies
cristianj23a
Partner - Creator III
Partner - Creator III

Usa esto en set analisys:

Count ( {<[Nombres de columna] = {'f','l','c'}>} valor)

Si no es el caso, puedes enviarme mas detalle. Si puedes un qvf de prueba con el caso.

 

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
qliker3
Creator
Creator
Author

Hey,

thank you for your reply.

I did 

Count ( {<columnnames = {'f','l','c'}>} fSnr)

but it still dosent work

cristianj23a
Partner - Creator III
Partner - Creator III

Hello, do you have more detail on your problem to help you?

Some images or qvf (you can download that from your qlik)

 

Regards.

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.