Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis P({$}) vs $::

Here is the case. Base on a existing report, I need to create 2 straight table which only filter by Sales Person and Payment mode.

1st table display list of products which the Customer Group has purchased. It should looks like this:

Group NameProduct
Asia Grp 1prod1, prod2, prod6, prod11
Asia Grp 2prod3, prod4, prod5, prod6
Eur Grp 1prod11
US Grp 1prod 10, prod11

2nd table display list of products which a customer has purchased. It should looks like this:

CustomerProduct
AAAprod1, prod11
BBBprod1
CCCprod3, prod 4
DDDprod 5, prod6

This 2 table can filter each other, as selection of a Group Name in the 1st table will filter 2nd table to display Customer belongs to that group. when a selection of a Customer, 1st table should display the Group information which this customer belong to.

So I create Product field as expressions like this:

Concat(<1{ SalesPerson= P({$} SalesPerson), PaymentMode= P({$} PaymentMode), CustomerGroup= P({$} CustomerGroup) }> [product], ' ,') for table one.

Concat(<1{ SalesPerson= P({$} SalesPerson), PaymentMode= P({$} PaymentMode), Customer= P({$} Customer) }> [product], ' ,') for table two.


It looks OK, but once I click on a Customer, the Customer Group will display the product purchased by the selected customer instead of the product purchased by the Group.


So I change the Set analysis to this:

Concat(<1{ SalesPerson= $::SalesPerson, PaymentMode= $::PaymentMode, CustomerGroup= $::CustomerGroup }> [product], ' ,') for table one.

Concat(<1{ SalesPerson= $::SalesPerson, PaymentMode= $::PaymentMode, Customer= $::Customer }> [product], ' ,')

for table two.

This time whatever I selected in one table it will not filter the other table....

Can someone explain to me what is the different between SalesPerson= P({$} SalesPerson) and SalesPerson= $::SalesPerson. How should I use them???

0 Replies