<?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: If statement with multiple match clauses and chart filtering in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/If-statement-with-multiple-match-clauses-and-chart-filtering/m-p/1857578#M70784</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/144230"&gt;@Evan0211&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Can you check what &lt;STRONG&gt;&amp;nbsp;Match()&lt;/STRONG&gt; is returning when you select more than 1 slice?&amp;nbsp;&lt;BR /&gt;1.&amp;nbsp; create a KPI using &lt;SPAN&gt;Match([OFFICE_CODE], $(vFilterOfficeCode))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.&amp;nbsp;&lt;/SPAN&gt;add a filter pane using&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;[OFFICE_CODE]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;3. Select 1 code in filter pane, then 2 codes. check the result (behavior) of KPI&amp;nbsp; =&amp;gt; this will show why the if statement is failing&lt;/P&gt;
&lt;P&gt;you can use a table as well and compare the result of your selections&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Wed, 10 Nov 2021 11:27:36 GMT</pubDate>
    <dc:creator>Joseph_Musekura</dc:creator>
    <dc:date>2021-11-10T11:27:36Z</dc:date>
    <item>
      <title>If statement with multiple match clauses and chart filtering</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-with-multiple-match-clauses-and-chart-filtering/m-p/1857304#M70763</link>
      <description>&lt;P&gt;I have a KPI that has an expression written as such:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=if(&lt;BR /&gt;Match([OFFICE_CODE], $(vFilterOfficeCode))&lt;BR /&gt;and &lt;BR /&gt;Match([List Title], $(vItemsToShow))&lt;BR /&gt;,&lt;/P&gt;
&lt;P&gt;Avg([SA Initial to Completed Days]),'error')&lt;/P&gt;
&lt;P&gt;For a pie chart control, I have the following expression:&lt;/P&gt;
&lt;P&gt;=Count({ &lt;BR /&gt;&amp;lt;[OFFICE_CODE] = {$(vFilterOfficeCode)}&amp;gt;&lt;BR /&gt;*&lt;BR /&gt;&amp;lt;[List Title] = {$(vItemsToShow)}&amp;gt;&lt;/P&gt;
&lt;P&gt;} [Title])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I select one slice of the pie chart, everything filters and the average is calculated, but if I select more than one slice of the pie chart, I receive the 'error' section of my if statement but I have no idea why.&amp;nbsp; The slices are using the same variable as the KPI if statement but if I select more than one slice, it fails.&amp;nbsp; Any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 17:37:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-with-multiple-match-clauses-and-chart-filtering/m-p/1857304#M70763</guid>
      <dc:creator>Evan0211</dc:creator>
      <dc:date>2021-11-09T17:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: If statement with multiple match clauses and chart filtering</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-with-multiple-match-clauses-and-chart-filtering/m-p/1857307#M70764</link>
      <description>&lt;P&gt;Hard to say without knowing what's behind those variables. Best guess is at least one of them contains an expression that won't work correctly if you select multiple values in whatever dimension the pie chart is using. Another alternative is that your KPI expression doesn't return a single value in this scenario, and since it's not wrapped in an aggregation function, that would cause it to null out. &lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 17:43:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-with-multiple-match-clauses-and-chart-filtering/m-p/1857307#M70764</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-11-09T17:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: If statement with multiple match clauses and chart filtering</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-with-multiple-match-clauses-and-chart-filtering/m-p/1857578#M70784</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/144230"&gt;@Evan0211&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Can you check what &lt;STRONG&gt;&amp;nbsp;Match()&lt;/STRONG&gt; is returning when you select more than 1 slice?&amp;nbsp;&lt;BR /&gt;1.&amp;nbsp; create a KPI using &lt;SPAN&gt;Match([OFFICE_CODE], $(vFilterOfficeCode))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.&amp;nbsp;&lt;/SPAN&gt;add a filter pane using&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;[OFFICE_CODE]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;3. Select 1 code in filter pane, then 2 codes. check the result (behavior) of KPI&amp;nbsp; =&amp;gt; this will show why the if statement is failing&lt;/P&gt;
&lt;P&gt;you can use a table as well and compare the result of your selections&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 11:27:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-with-multiple-match-clauses-and-chart-filtering/m-p/1857578#M70784</guid>
      <dc:creator>Joseph_Musekura</dc:creator>
      <dc:date>2021-11-10T11:27:36Z</dc:date>
    </item>
  </channel>
</rss>

