<?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 Macro to add condition to expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-to-add-condition-to-expression/m-p/278737#M103764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So doesn't anyone have any clue about this? I'd be surprised if there is no way to programmatically insert conditions for expressions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Oct 2011 08:47:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-10-28T08:47:21Z</dc:date>
    <item>
      <title>Macro to add condition to expression</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-add-condition-to-expression/m-p/278736#M103763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if there is any kind of way that will allow me to add a condition to expressions through macros. At the moment I have a macro that dynamically adds expressions to a chart and I want to make sure the expressions are alwys greater than zero. Otherwise they shouldn't apper in the graph. Looking at the API the only thing I found was EvaluationCondition command, which only applies to table objects though. Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 10:28:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-add-condition-to-expression/m-p/278736#M103763</guid>
      <dc:creator />
      <dc:date>2011-10-27T10:28:17Z</dc:date>
    </item>
    <item>
      <title>Macro to add condition to expression</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-add-condition-to-expression/m-p/278737#M103764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So doesn't anyone have any clue about this? I'd be surprised if there is no way to programmatically insert conditions for expressions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 08:47:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-add-condition-to-expression/m-p/278737#M103764</guid>
      <dc:creator />
      <dc:date>2011-10-28T08:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to add condition to expression</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-add-condition-to-expression/m-p/278738#M103765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;I know this is very old thread but have you got around a way to add conditional expressions using VB Script?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;DV&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 15:48:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-add-condition-to-expression/m-p/278738#M103765</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2014-08-28T15:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to add condition to expression</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-add-condition-to-expression/m-p/278739#M103766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look here: &lt;A href="https://community.qlik.com/thread/130886"&gt;Macro for Conditional expression in chart&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 15:54:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-add-condition-to-expression/m-p/278739#M103766</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-08-28T15:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to add condition to expression</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-add-condition-to-expression/m-p/278740#M103767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Recognise that this is quite an old thread but the answer is found in bold and underlined in the example code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set chart = ActiveDocument.ActiveSheet.CreateStraightTable&lt;/P&gt;&lt;P&gt;chart.AddDimension "Customer"&lt;/P&gt;&lt;P&gt;chart.AddExpression "sum(Amount)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set cp = chart.GetProperties&lt;/P&gt;&lt;P&gt;set expr = cp.Expressions.Item(0).Item(0).Data.EnableCondition&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;expr.Type = 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;expr.Expression = "Sum(Amount)&amp;gt; 500"&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&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;chart.SetProperties cp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You first need to enable the tick the conditional option type (=2) then add the expression (you conditional expression).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Long&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 May 2018 21:25:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-add-condition-to-expression/m-p/278740#M103767</guid>
      <dc:creator>long_huynh</dc:creator>
      <dc:date>2018-05-27T21:25:40Z</dc:date>
    </item>
  </channel>
</rss>

