<?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 Changing filters on multiple variables simultaneously in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Changing-filters-on-multiple-variables-simultaneously/m-p/326886#M1180632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables like attached below (just an example) with two similar variables Continent for Client and Region for Person. What I would like to have is one list box that would allow me to change the filters on both variables in a way that if Continent=Europe then Region=Europe. Is there a way to set this up somehow? (and I don't want to create a new table with both Client and Person in it and one "location" variable). I know that it would be easy to have two list boxes and just change the filters on both of them but I would really appreciat if someone knew a more elegant solution (and I actually need it).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Client&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Continent&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ABC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Europe&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;XYZ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Asia&lt;/P&gt;&lt;P&gt;DEF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; North America&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Person&amp;nbsp;&amp;nbsp; Region&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Asia&lt;/P&gt;&lt;P&gt;Mike&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Europe&lt;/P&gt;&lt;P&gt;Pete&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; North America&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help,&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Dec 2011 10:57:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-12-28T10:57:23Z</dc:date>
    <item>
      <title>Changing filters on multiple variables simultaneously</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-filters-on-multiple-variables-simultaneously/m-p/326886#M1180632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables like attached below (just an example) with two similar variables Continent for Client and Region for Person. What I would like to have is one list box that would allow me to change the filters on both variables in a way that if Continent=Europe then Region=Europe. Is there a way to set this up somehow? (and I don't want to create a new table with both Client and Person in it and one "location" variable). I know that it would be easy to have two list boxes and just change the filters on both of them but I would really appreciat if someone knew a more elegant solution (and I actually need it).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Client&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Continent&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ABC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Europe&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;XYZ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Asia&lt;/P&gt;&lt;P&gt;DEF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; North America&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Person&amp;nbsp;&amp;nbsp; Region&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Asia&lt;/P&gt;&lt;P&gt;Mike&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Europe&lt;/P&gt;&lt;P&gt;Pete&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; North America&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help,&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2011 10:57:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-filters-on-multiple-variables-simultaneously/m-p/326886#M1180632</guid>
      <dc:creator />
      <dc:date>2011-12-28T10:57:23Z</dc:date>
    </item>
    <item>
      <title>Changing filters on multiple variables simultaneously</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-filters-on-multiple-variables-simultaneously/m-p/326887#M1180633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; You could probably do this with actions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right-click the sheet and go to properties, then the triggers tab. Find your list box for Continent, and add an action. Make the action a 'Selection in field' action. make the field 'Region', and in the search string, create an expression to make it equal to the Continent selection. Something like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=GetFieldSelections(Continent)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should work. If you have to deal with multiple selections, this may not work, but give it a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2011 12:19:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-filters-on-multiple-variables-simultaneously/m-p/326887#M1180633</guid>
      <dc:creator />
      <dc:date>2011-12-28T12:19:55Z</dc:date>
    </item>
    <item>
      <title>Changing filters on multiple variables simultaneously</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-filters-on-multiple-variables-simultaneously/m-p/326888#M1180634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does work to some extent because the trigger works when the list box is either activated or deactivated (depending which you choose) when the filter is on Contintent. So for example (lets say the triggers is set off when I deactivate the list box) if I set the Continent to Pan Europe I have to click somewhere on the report, outside the Continent list box, for it to be applied on the Region variable. If I use the trigger that's set off on activating the list box then I have to first deactivate and then activate the list box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionally it doesn't seem to work with multiple selections like you've said.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2011 13:04:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-filters-on-multiple-variables-simultaneously/m-p/326888#M1180634</guid>
      <dc:creator />
      <dc:date>2011-12-28T13:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Changing filters on multiple variables simultaneously</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-filters-on-multiple-variables-simultaneously/m-p/326889#M1180635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did this once with macros before, back before there were actions.&amp;nbsp; Here's an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sub setMonth()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ActiveDocument.getField("Display Month").selectValues ActiveDocument.getField("Month").getSelectedValues&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's triggered on select or on change of the field "Month", not on activate or deactivate of the list box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure there's some correct expression to do it with actions, which would be preferable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2011 17:29:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-filters-on-multiple-variables-simultaneously/m-p/326889#M1180635</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-12-28T17:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Changing filters on multiple variables simultaneously</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-filters-on-multiple-variables-simultaneously/m-p/326890#M1180636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, this was very helpful. The macro works for multiple selections as well. I've used Triggers under Document Properties and then in Field Event Triggers I've found my Continent variable and put the macro as an action for both "On Select" and "On Change" to ensure that the filters are execty the same on Region when I select or deselect values from Continent the list box (used your macro just changed the names of the variables):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sub setMonth()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ActiveDocument.getField("Region").selectValues ActiveDocument.getField("Continent").getSelectedValues&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One important thing was to add the macro to Field Event Triggers and not Sheet Object Event Triggers (which only allow "OnActivate" and "OnDeactivate") - adding some explanation in case someone else has the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and take care,&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Dec 2011 08:18:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-filters-on-multiple-variables-simultaneously/m-p/326890#M1180636</guid>
      <dc:creator />
      <dc:date>2011-12-29T08:18:59Z</dc:date>
    </item>
  </channel>
</rss>

