Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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