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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count If Question

Hello again,

a small Question this time:

I have an table with Employee, Customer ID, Date of visit and a Column "X". Looks like this:

Employee - Customer ID - Date of Visit - X

hhhhh          676762          01.06.2012     +

jjjjjj               586566          02.06.2012.     -

....

The Column "X" contains +, -, K or P. In a straight table i want to add an calculated field that counts the "+" or "-"....(One customer can have more than 1 visits).

My Question: How the formula looks like to count for every Customer the amounts of "+", "-"?

Thank you for your help

Labels (1)
1 Solution

Accepted Solutions
Miguel_Angel_Baeyens
Support
Support

Hi,

Try instead

Count({< X = {'+'} >} X)

Hope that helps now.

Miguel

View solution in original post

4 Replies
Miguel_Angel_Baeyens
Support
Support

Hi,

Did you try using set analysis? In a new chart, type straight table, the dimension should be Customer ID, and the expression something like

Count({< X = {'+'} >} [Customer ID])

or

Count({< X = {'-'} >} [Customer ID])

Hope that helps.

Miguel

Not applicable
Author

Hello,

unfortunately it doesnt work for me. Your formula gives me only "1" as a value. But in my table are 13 "+" values for this customer. The fornula should show me the value 13 for this customer.

Kristian

Miguel_Angel_Baeyens
Support
Support

Hi,

Try instead

Count({< X = {'+'} >} X)

Hope that helps now.

Miguel

Not applicable
Author

Thank you a lot.