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: 
peterstalberg
Contributor III
Contributor III

Set analysis issue

Hi experts, 

As per the below table  [Country]='Sweden' and [Customer]='BB','CC' are selected (italic & underlined).  Measure 1-3 works OK but in the last column I want to show sum(Sales) for all Countries and Customer except for Customers not selected under the selected country (Sweden in this example). How do I write a set expression for this? Any assistance would be highly appreciated. RGDS//Peter

 

Country Customer sum(
{1}
Sales)
sum(
{1 <Country={'$(=getfieldselections(Country))'}> }
Sales)
sum
 {1 <Country={'$(=getfieldselections(Country))'},  Customer=$::Customer > }
 Sales)
?
SA: - 1700 700 500 1500
Sweden AA 150 150 - -
Sweden BB 200 200 200 200
Sweden CC 300 300 300 300
Sweden DD 50 50 - -
Norway EE 300 - - 300
Norway FF 200 - - 200
Norway GG 200 - - 200
Norway HH 300 - - 300
Labels (1)
1 Solution

Accepted Solutions
vikasmahajan

Hi,

Did you try indirect set analysis P() & E() :

https://community.qlik.com/t5/QlikView-App-Dev/Indirect-Set-Analysis/td-p/1300861

https://community.qlik.com/t5/QlikView-App-Dev/P-E-functions/td-p/1346858

https://community.qlik.com/t5/QlikView-App-Dev/P-E-and-where-do-you-use-them/td-p/457847

sum({<  Country =E(Country={'$(=getfieldselections(Country))'} Customer )>}   Sales)

Hope this help you.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.

View solution in original post

1 Reply
vikasmahajan

Hi,

Did you try indirect set analysis P() & E() :

https://community.qlik.com/t5/QlikView-App-Dev/Indirect-Set-Analysis/td-p/1300861

https://community.qlik.com/t5/QlikView-App-Dev/P-E-functions/td-p/1346858

https://community.qlik.com/t5/QlikView-App-Dev/P-E-and-where-do-you-use-them/td-p/457847

sum({<  Country =E(Country={'$(=getfieldselections(Country))'} Customer )>}   Sales)

Hope this help you.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.