<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Filter Expression using Column with List of Values in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Filter-Expression-using-Column-with-List-of-Values/m-p/1764138#M59087</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/117189"&gt;@estebanafonso&lt;/a&gt;&amp;nbsp;, here an example that you can use if you want to solve it by script :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;load * inline [&lt;BR /&gt;Unique Case Id, Country,Value,Benchmark Countries&lt;BR /&gt;A, US, 5, "US,France"&lt;BR /&gt;X, US, 3, "US,France"&lt;BR /&gt;Z, France, 2, "Japan,US,Germany"&lt;BR /&gt;Y, Germany, 3, "China"&lt;BR /&gt;G, China, 6, "US,Germany"&lt;BR /&gt;F, China, 1, "US,Germany"&lt;BR /&gt;N, China, 2, "US,Germany"&lt;BR /&gt;L, Japan, 3, "US"&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Data2:&lt;BR /&gt;Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp;distinct&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Country,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;trim(subfield([Benchmark Countries],',')) as MyCountries&lt;BR /&gt;Resident Data;&lt;/P&gt;&lt;P&gt;left join&lt;BR /&gt;Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Country as MyCountries,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;sum(Value) as sumValue&lt;BR /&gt;Resident Data&lt;BR /&gt;group by Country;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Nov 2020 20:31:27 GMT</pubDate>
    <dc:creator>QFabian</dc:creator>
    <dc:date>2020-11-24T20:31:27Z</dc:date>
    <item>
      <title>Filter Expression using Column with List of Values</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-Expression-using-Column-with-List-of-Values/m-p/1764103#M59083</link>
      <description>&lt;P&gt;Input Table&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Unique Case Id&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Benchmark Countries&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;"US", "France"&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;"US", "France"&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Z&lt;/TD&gt;&lt;TD&gt;France&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;"Japan", "US", "Germany"&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;Germany&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;"China"&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;G&lt;/TD&gt;&lt;TD&gt;China&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;"US", "Germany"&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;China&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;"US", "Germany"&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;China&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;"US", "Germany"&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;L&lt;/TD&gt;&lt;TD&gt;Japan&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;"US"&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aggregated Table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Benchmark Countries&lt;/TD&gt;&lt;TD&gt;Benchmark Sum(Values)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;US&lt;/TD&gt;&lt;TD&gt;"US", "France"&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;France&lt;/TD&gt;&lt;TD&gt;"Japan", "US", "Germany"&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Germany&lt;/TD&gt;&lt;TD&gt;"China"&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;China&lt;/TD&gt;&lt;TD&gt;"US", "Germany"&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Japan&lt;/TD&gt;&lt;TD&gt;"US"&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I have a table with a similar structure to the first.&amp;nbsp; What I need to do, in essence, is to write expression that creates the 3 column in 2nd table, where for each countries it produces the sum of the values from that country's benchmark countries.&amp;nbsp; For example for France benchmark countries are Japan, US, and Germany, so result is 14 (3+5+3+3).&amp;nbsp; The expressions I have been tinkering with tend to like the one below but I whatever I try I can not get it to work correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUM({$&amp;lt;Country={$(=MaxString([Benchmark Countries]))}&amp;gt;} Aggr(SUM(TOTAL &amp;lt;Country&amp;gt; Value), Country))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 16:29:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-Expression-using-Column-with-List-of-Values/m-p/1764103#M59083</guid>
      <dc:creator>estebanafonso</dc:creator>
      <dc:date>2020-11-24T16:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Expression using Column with List of Values</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-Expression-using-Column-with-List-of-Values/m-p/1764138#M59087</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/117189"&gt;@estebanafonso&lt;/a&gt;&amp;nbsp;, here an example that you can use if you want to solve it by script :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;load * inline [&lt;BR /&gt;Unique Case Id, Country,Value,Benchmark Countries&lt;BR /&gt;A, US, 5, "US,France"&lt;BR /&gt;X, US, 3, "US,France"&lt;BR /&gt;Z, France, 2, "Japan,US,Germany"&lt;BR /&gt;Y, Germany, 3, "China"&lt;BR /&gt;G, China, 6, "US,Germany"&lt;BR /&gt;F, China, 1, "US,Germany"&lt;BR /&gt;N, China, 2, "US,Germany"&lt;BR /&gt;L, Japan, 3, "US"&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Data2:&lt;BR /&gt;Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp;distinct&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Country,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;trim(subfield([Benchmark Countries],',')) as MyCountries&lt;BR /&gt;Resident Data;&lt;/P&gt;&lt;P&gt;left join&lt;BR /&gt;Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Country as MyCountries,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;sum(Value) as sumValue&lt;BR /&gt;Resident Data&lt;BR /&gt;group by Country;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 20:31:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-Expression-using-Column-with-List-of-Values/m-p/1764138#M59087</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2020-11-24T20:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Expression using Column with List of Values</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-Expression-using-Column-with-List-of-Values/m-p/1765320#M59202</link>
      <description>&lt;P&gt;Hi Fabian, I played around with it, and I think this approach will get me where I need to go.&amp;nbsp; Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 18:11:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-Expression-using-Column-with-List-of-Values/m-p/1765320#M59202</guid>
      <dc:creator>estebanafonso</dc:creator>
      <dc:date>2020-11-30T18:11:16Z</dc:date>
    </item>
  </channel>
</rss>

