<?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 Filter two fields at the same time in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Filter-two-fields-at-the-same-time/m-p/2095183#M89731</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I have two columns in a table where one row represents one transaction. The first column represents which location a package originated from. The other column represents which location the package is going. How can I implement a filter or toggle that when clicked will filter the whole sheet to transactions where a specific pair of locations are involved?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;So basically I want an option to view only transactions where it was either Location A to Location B or Location B to Location A.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jul 2023 08:12:28 GMT</pubDate>
    <dc:creator>SET_Padawan</dc:creator>
    <dc:date>2023-07-19T08:12:28Z</dc:date>
    <item>
      <title>Filter two fields at the same time</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-two-fields-at-the-same-time/m-p/2095183#M89731</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have two columns in a table where one row represents one transaction. The first column represents which location a package originated from. The other column represents which location the package is going. How can I implement a filter or toggle that when clicked will filter the whole sheet to transactions where a specific pair of locations are involved?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;So basically I want an option to view only transactions where it was either Location A to Location B or Location B to Location A.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 08:12:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-two-fields-at-the-same-time/m-p/2095183#M89731</guid>
      <dc:creator>SET_Padawan</dc:creator>
      <dc:date>2023-07-19T08:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Filter two fields at the same time</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-two-fields-at-the-same-time/m-p/2096740#M89830</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;
&lt;P&gt;This is a scenario in which you can use a LinkTable to solve it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sending a solution that may help you, but I also suggest you to read about the LinkTable concepts, it is a really useful concept to master on data modelling in Qlik Sense:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-Documents/link-table/ta-p/1883375" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Sense-Documents/link-table/ta-p/1883375&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;And now for your problem, try something like this:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;Table:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load * Inline [&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Origin, Destination&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;USA, Brazil&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;USA, Germany&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Brazil, Spain&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Brazil, Netherlands&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;France, Japan&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Japan, Spain&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Spain, USA&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Germany, USA&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Germany, Japan&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Japan, Brazil&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Spain, France&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;Fact: //Create a key field in your table with the fields you want to filter&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Origin,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Destination,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Origin &amp;amp; ' - ' &amp;amp; Destination as Key_Location&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Resident Table;&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;Drop Table Table; // drop the former table to avoid synthetic keys&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;LinkTable: // The linktable will have a concatenate block for each field you want to filter together &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Origin as LinkTable_Origin,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Key_Location,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Origin &amp;amp; ' - ' &amp;amp; Key_Location as Key_Dimension&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Resident Fact;&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;Concatenate (LinkTable)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Destination as LinkTable_Destination,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Key_Location,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Destination &amp;amp; ' - ' &amp;amp; Key_Location as Key_Dimension&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Resident Fact;&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;Dimension: // Finally you build the field/dimension you will use in your filters &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load Distinct&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Origin as Location,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Origin &amp;amp; ' - ' &amp;amp; Key_Location as Key_Dimension&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Resident Fact;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Concatenate(Dimension)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load Distinct&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Destination as Location,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Destination &amp;amp; ' - ' &amp;amp; Key_Location as Key_Dimension&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Resident Fact;&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;Drop Fields LinkTable_Origin, LinkTable_Destination; // a last drop to avoid synthetic keys&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps, and feel free to ask any questions.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 20:43:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-two-fields-at-the-same-time/m-p/2096740#M89830</guid>
      <dc:creator>mageste</dc:creator>
      <dc:date>2023-07-24T20:43:25Z</dc:date>
    </item>
  </channel>
</rss>

