Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

I need help! Doing a count by an expression!

I created a graphic with the following expression:
If ([Value] = 0 'Not bought', 'bought')

The size of this graph are codes of clients, because I'm considering whether my customer bought or not.
I wonder how would do to make the count of customers, how many customers have purchased and how many customers did not buy!

I can do a count of a speech!

Thanks!

2 Replies
Highlighted
Not applicable

if customers have not bought

=count(distinct If ([Value] = 0, customer_code))

if customers have bought

=count(distinct If ([Value] > 0, customer_code))

otherwise you can use a flag when you are loading the script

LOAD

If ([Value] = 0, 'Not Bought', Bought) as cust _flag

From Table x;

the expression would be if customers have bought

=count(distinct If ([cust _flag ='Bought', customer_code))

Highlighted
Not applicable

Hi,

I will make such changes and respond if it worked!

Thank you for your attention!