Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
nboccassini
Partner - Creator
Partner - Creator

Set analysis - field value equal to other field

Hi all,

I have an app with two tables

nboccassini_0-1642777609976.png

nboccassini_1-1642777874287.png

 

I need a pivot that sum the value only for loc that have year=year1. The pivot must have type and year as dimensions.

How can I make it ? Using set analysis?

Labels (1)
5 Replies
Ksrinivasan
Specialist
Specialist

Hi,  first you have to create one more year1 in table 2 with name of year, Second, Right join table 1 and table2.  With reference of Year. Now you create a formula in set of year1 is not equal to '' empty. Result is your s.

nboccassini
Partner - Creator
Partner - Creator
Author

For other reason, I can't join the table (the real app in more complicated)

 

vikasmahajan

Please try this : 

=sum({$< loc = {"=year = year1"}>}Value)

 

reference : https://community.qlik.com/t5/QlikView-App-Dev/compare-2-fields-set-analysis/td-p/1183006

Hope this helps

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.
nboccassini
Partner - Creator
Partner - Creator
Author

Thanks Vikas,

but your solution works only if ther is ony one year1 for each year

Digvijay_Singh

May be if possible, create composite key using loc and year in both the tables as in sample attached -