Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i have a table that show my customers with their buy
i need this
when i click on some product i need a list of customer that they dont buy the selected product
how can i create this list?
it means that when i select 3 in product list i need a list with 100 and 101 customers
PFA
=Aggr(Only({<product=e(product)>}customer),customer)
May be this
Table:
LOAD * INLINE [
customer, product
100, 2
101, 1
100, 1
103, 3
];
Temp:
LOAD Distinct customer
Resident Table;
Left Join (Temp)
LOAD Distinct product
Resident Table;
Left Join (Temp)
LOAD *,
1 as Flag
Resident Table;
FinalTable:
LOAD product,
If(Flag = 1, customer) as customer,
If(Len(Trim(Flag)) = 0, customer) as not_customer
Resident Temp;
DROP Table Table, Temp;
What does the Aggr(Customer , Customer) part do , please explain?
I understand the rest