<?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: Using a variable in a chart If statement in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-a-variable-in-a-chart-If-statement/m-p/1929777#M76546</link>
    <description>&lt;P&gt;Yes that is working for me. Thanks for your help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A quick one so im not returning with a similar question , When square brackets are used can you just filter out/In conditions after using an aggregate function.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 May 2022 11:50:39 GMT</pubDate>
    <dc:creator>tomf122</dc:creator>
    <dc:date>2022-05-12T11:50:39Z</dc:date>
    <item>
      <title>Using a variable in a chart If statement</title>
      <link>https://community.qlik.com/t5/App-Development/Using-a-variable-in-a-chart-If-statement/m-p/1929701#M76539</link>
      <description>&lt;P&gt;I am having an issue getting an if statement to work for one of the variables I have set up.&lt;/P&gt;
&lt;P&gt;I am basically creating a drop down for days of the week and then want to show a count of a field when selected.&lt;/P&gt;
&lt;P&gt;When I use one variable I can get it to work such as below, but when trying a few it wont work. Anyone know what I am doing wrong&amp;nbsp; and how it can be resolved ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Working currently :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(vdaydropdown = 'Mon', Count (MVT), Day_name = 'Mon')&lt;/P&gt;
&lt;P&gt;Attempt that wont work:&lt;/P&gt;
&lt;P&gt;if(vdaydropdown = 'Mon', Count (MVT), Day_name = 'Mon',&lt;BR /&gt;if(vdaydropdown = 'Tue', Count (MVT), Day_name = 'Tue',&lt;BR /&gt;if(vdaydropdown = 'Wed', Count (MVT), Day_name = 'Wed',&lt;BR /&gt;if(vdaydropdown = 'Thu', Count (MVT), Day_name = 'Thu',&lt;BR /&gt;if(vdaydropdown = 'Fri', Count (MVT), Day_name = 'Fri',&lt;BR /&gt;if(vdaydropdown = 'Sat', Count (MVT), Day_name = 'Sat',&lt;BR /&gt;if(vdaydropdown = 'Sun', Count (MVT), Day_name = 'Sun' )))))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 09:53:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-a-variable-in-a-chart-If-statement/m-p/1929701#M76539</guid>
      <dc:creator>tomf122</dc:creator>
      <dc:date>2022-05-12T09:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable in a chart If statement</title>
      <link>https://community.qlik.com/t5/App-Development/Using-a-variable-in-a-chart-If-statement/m-p/1929717#M76540</link>
      <description>&lt;P&gt;This doesn't look like a valid set of nested if() statements and it doesn't seem to have any logical flow to it either - in this scenario, even if it worked, the result for any day selected would be Count(MVT)?&lt;/P&gt;
&lt;P&gt;The syntax for nesting if() statements would typically be something like&lt;/P&gt;
&lt;P&gt;If(Condition,When_True, //Else&lt;/P&gt;
&lt;P&gt;If(Condition2,When_True2, //Else&lt;/P&gt;
&lt;P&gt;If(Condition3,When_True3, When_All_False)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 10:30:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-a-variable-in-a-chart-If-statement/m-p/1929717#M76540</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-05-12T10:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable in a chart If statement</title>
      <link>https://community.qlik.com/t5/App-Development/Using-a-variable-in-a-chart-If-statement/m-p/1929724#M76541</link>
      <description>&lt;P&gt;I am new to Qlicksense so might be wrong the way i am writing it. I am trying to say when my variable is set to Mon then count(Mvt)&amp;nbsp; where the field that is behind the variable is also to Mon. Is there a need to include the final clause?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 10:18:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-a-variable-in-a-chart-If-statement/m-p/1929724#M76541</guid>
      <dc:creator>tomf122</dc:creator>
      <dc:date>2022-05-12T10:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable in a chart If statement</title>
      <link>https://community.qlik.com/t5/App-Development/Using-a-variable-in-a-chart-If-statement/m-p/1929737#M76543</link>
      <description>&lt;P&gt;if(vdaydropdown = 'Mon', Count (MVT), Day_name = 'Mon')&lt;/P&gt;
&lt;P&gt;Will return Count(MVT) when vdaydropdown&amp;nbsp; is set to 'Mon', and in all other cases, will return either true or false depending on what the condition Day_name - 'Mon' evaluated to.&lt;/P&gt;
&lt;P&gt;Perhaps you're thinking of something like&lt;/P&gt;
&lt;P&gt;Count({&amp;lt; Dayname = {'Mon'} &amp;gt;} MVT)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 10:32:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-a-variable-in-a-chart-If-statement/m-p/1929737#M76543</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-05-12T10:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable in a chart If statement</title>
      <link>https://community.qlik.com/t5/App-Development/Using-a-variable-in-a-chart-If-statement/m-p/1929777#M76546</link>
      <description>&lt;P&gt;Yes that is working for me. Thanks for your help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A quick one so im not returning with a similar question , When square brackets are used can you just filter out/In conditions after using an aggregate function.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 11:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-a-variable-in-a-chart-If-statement/m-p/1929777#M76546</guid>
      <dc:creator>tomf122</dc:creator>
      <dc:date>2022-05-12T11:50:39Z</dc:date>
    </item>
  </channel>
</rss>

