<?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 How to make this expression respect filter? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-make-this-expression-respect-filter/m-p/2438997#M97140</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a expression that works with alternate states that is applied to a filter, for which I'm using as an 'exclusion' filter. Whatever is selected in this specific filter, will remove customer_ids from the calculation.&lt;/P&gt;
&lt;P&gt;Everything works fine, except it won't respect the customer_id filter selections (not the exclusion, but a normal filter)&lt;/P&gt;
&lt;P&gt;How can I make this expression respect the customer_id selected and still work with the 'exclusion' filter?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Count(Distinct {&amp;lt;customer_id = E({BrandExclusion&amp;lt;product_brand = {$(=chr(39)&amp;amp;GetFieldSelections(product_brand_exc,''',''',20,'BrandExclusion')&amp;amp;chr(39))}&amp;gt;} customer_id)&amp;gt;} customer_id)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="therealdees_0-1712588120059.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163666i0704CD24E294C28F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="therealdees_0-1712588120059.png" alt="therealdees_0-1712588120059.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the picture above you can see the KPI (Clientes 14.602) is calculating considering every customer_id that matches the set analysis condition of the excluded brands and ignores the fact I'm filtering a single customer_id (81895). What I need is to display data for the selected customer_ids (if selected at all) and also exclude the registry if the customer has bought any of the brands selected in the 'exclusion' filter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: I changed the field names to facilitate understanding of the expression; key_cliente = customer_id&lt;/P&gt;</description>
    <pubDate>Mon, 08 Apr 2024 15:00:16 GMT</pubDate>
    <dc:creator>pedrohenriqueperna</dc:creator>
    <dc:date>2024-04-08T15:00:16Z</dc:date>
    <item>
      <title>How to make this expression respect filter?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-make-this-expression-respect-filter/m-p/2438997#M97140</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a expression that works with alternate states that is applied to a filter, for which I'm using as an 'exclusion' filter. Whatever is selected in this specific filter, will remove customer_ids from the calculation.&lt;/P&gt;
&lt;P&gt;Everything works fine, except it won't respect the customer_id filter selections (not the exclusion, but a normal filter)&lt;/P&gt;
&lt;P&gt;How can I make this expression respect the customer_id selected and still work with the 'exclusion' filter?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Count(Distinct {&amp;lt;customer_id = E({BrandExclusion&amp;lt;product_brand = {$(=chr(39)&amp;amp;GetFieldSelections(product_brand_exc,''',''',20,'BrandExclusion')&amp;amp;chr(39))}&amp;gt;} customer_id)&amp;gt;} customer_id)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="therealdees_0-1712588120059.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/163666i0704CD24E294C28F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="therealdees_0-1712588120059.png" alt="therealdees_0-1712588120059.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the picture above you can see the KPI (Clientes 14.602) is calculating considering every customer_id that matches the set analysis condition of the excluded brands and ignores the fact I'm filtering a single customer_id (81895). What I need is to display data for the selected customer_ids (if selected at all) and also exclude the registry if the customer has bought any of the brands selected in the 'exclusion' filter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: I changed the field names to facilitate understanding of the expression; key_cliente = customer_id&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 15:00:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-make-this-expression-respect-filter/m-p/2438997#M97140</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2024-04-08T15:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to make this expression respect filter?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-make-this-expression-respect-filter/m-p/2439035#M97143</link>
      <description>&lt;P&gt;Hi, can you try with?:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Count(Distinct {&amp;lt;customer_id = &lt;STRONG&gt;P(customer_id) *&lt;/STRONG&gt; E({BrandExclusion&amp;lt;product_brand = {$(=chr(39)&amp;amp;GetFieldSelections(product_brand_exc,''',''',20,'BrandExclusion')&amp;amp;chr(39))}&amp;gt;} customer_id)&amp;gt;} customer_id)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 17:49:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-make-this-expression-respect-filter/m-p/2439035#M97143</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2024-04-08T17:49:45Z</dc:date>
    </item>
  </channel>
</rss>

