Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
i would like to write an expression which shows the total amout of customers that bought product A and B but not C.
Load * Inline [
Customer,Product
CUST1,A
CUST1,B
CUST2,A
CUST3,B
CUST4,A
CUST4,B
CUST4,C
CUST5,C
];
I wrote this expression and it works but unfortunatelly the result cannot be summed so the "total" of my table is = 0 and if i try to put this expression in a KPI it returns 0 and i would like to see the customer count.
=fabs(count({<Product={'A'}>}Customer)>0 and count({<Product={'B'}>}Customer)>0 and count({<Product={'C'}>}Customer)<=0)
How to fix it ?
The result of this expression with above dataset must be 1 (so only CUST1).
May be try this
Count(DISTINCT {<Customer = p({<Product = {'A'}>})*p({<Product = {'B'}>})*e({<Product = {'C'}>})>} Customer)
Hi,
Customer Count : Count({<Product={'A','B'}>}Customer)
Product CustomerCount
A 3
B 3
Is this the expected output then
In table add Product Dimension & in Measure add If condition
if(Product='A',count(Customer),
if(Product='B',count(Customer)))
In add-ons -> data handling -> uncheck include null values.
May be try this
Count(DISTINCT {<Customer = p({<Product = {'A'}>})*p({<Product = {'B'}>})*e({<Product = {'C'}>})>} Customer)
I need to check what if some customer buy both product then how we can write the script in qlik sense