Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expressionproblem

I got a problem with an expression =count(item='a') or is it = count(item)='a' - either way it doesnt work for me.

I got a small test spreedsheet with 2 columns YEAR and ITEM.

YEAR ITEM
2008 a
2008 a
2008 b
2009 a
2009 b
2010 a
I want to make a chart with YEAR as dimension af only showing how many ITEMS a there is?

1 Solution

Accepted Solutions
deepakk
Partner - Specialist III
Partner - Specialist III

try this expression

count(If(Item='a', item)

Deepak

View solution in original post

3 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

try this expression

count(If(Item='a', item)

Deepak

Not applicable
Author

Deepak - thanx it works like this

count(If(Item='a', item)), - you missed the last )

regards it solved my problem

johnw
Champion III
Champion III

Set analysis is faster if you have a lot of data and are using version 8.5 or above:

count({<item={'a'}>} item)