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 |
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
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