Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Straight Table and p() Expression & Dimension

I’m trying to capture data from a list box of selections, list every combinations of accounts that have sold these product item sets, and store those in a straight table.

For example, say you select 3 products, I want to know the count of the accounts that have sold any combination of these dynamically:

Combinations

# of Accounts

Product 1 & Product 2 & Product 3

1

Product 1 & Product 2 (no Product 3)

5

Product 1 & Product 3 (no Product 2)

1

Product 2 & Product 3 (no Product 1)

1

Total Accounts

7

I’m test this to see if I can make it work on just summing the sales:

=sum({$<[Accounts] = p({$<[Products From Table 2]={$(SubField(vProducts,'^',1))}>}[Accounts]) - p({$<[Products From Table 2]={$(SubField(vProducts,'^',2))}>}[Accounts])>} Sales)

But, would want the account count distinct that have sold these combinations. Make sense?

See also ppt attached.

Josh

0 Replies