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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - Rolling data to different levels

Hi, Can anyone help?

I have item level data that I need to analysis at both customer and transaction level.

I need to identify the number of customers in three different groups:

1.  The customers just buying the brand in the current selection and their spend.

2.  The customers buying the brand in the current selection and other brands as well.  Split by the spend on the brand and non-brand sales.

3.  The customers not buying the brand in the current selection and their spend.

I have been trying to use set analysis to do this, but can't seem to get my head around the correct formula.  Using the possible select seems a necessary step, but I am not sure whether using the exclusion of the possible select would work (e.g brand=e({$}brand) ) or whether something along this lines is better:

=sum({$<cid=p({$ <brand=>-<brand=p({$}brand)>} [cid]) >} sale_price)

The data has the following fields on:

cid = customer id

basket_urn = transaction identifier

sale_price = cost of item

Many thanks for any help,

John

0 Replies