<?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 if or where? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-or-where/m-p/435013#M1162671</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a simple expression where the dimension is YEAR. For the year 2010, my expression gives me the incorrect total (this is because the source data is incorrect and I cannot change it) so for 2010 I need to add an extra 4 to the count - how can I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StatusFlagID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'*1*'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;IncidentType&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'*Accident*'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ListTitle&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'*Employee*'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StatusFlagID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #ff8000; font-size: 8pt; text-decoration: underline;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Oct 2012 20:03:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-19T20:03:09Z</dc:date>
    <item>
      <title>if or where?</title>
      <link>https://community.qlik.com/t5/QlikView/if-or-where/m-p/435013#M1162671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a simple expression where the dimension is YEAR. For the year 2010, my expression gives me the incorrect total (this is because the source data is incorrect and I cannot change it) so for 2010 I need to add an extra 4 to the count - how can I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StatusFlagID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'*1*'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;IncidentType&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'*Accident*'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ListTitle&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'*Employee*'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StatusFlagID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #ff8000; font-size: 8pt; text-decoration: underline;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 20:03:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-or-where/m-p/435013#M1162671</guid>
      <dc:creator />
      <dc:date>2012-10-19T20:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: if or where?</title>
      <link>https://community.qlik.com/t5/QlikView/if-or-where/m-p/435014#M1162673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have data inconsistency, I would very much recommend you to fix it in the script and not in the object expression. Not even in the front-end application script but on a previous transformation level of QVWs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, you can add it like this:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13506786803857119" jivemacro_uid="_13506786803857119"&gt;SUM(...) + IF(YEAR=2010, 4)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 20:28:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-or-where/m-p/435014#M1162673</guid>
      <dc:creator>diegofcaivano</dc:creator>
      <dc:date>2012-10-19T20:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: if or where?</title>
      <link>https://community.qlik.com/t5/QlikView/if-or-where/m-p/435015#M1162675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that doesn't seem to be working..any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 20:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-or-where/m-p/435015#M1162675</guid>
      <dc:creator />
      <dc:date>2012-10-19T20:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: if or where?</title>
      <link>https://community.qlik.com/t5/QlikView/if-or-where/m-p/435016#M1162677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use either&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;rangesum(sum(....), if(YEAR=2010,4))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum(....) + if(YEAR=2010,4,0)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(YEAR=2010,4)&lt;/EM&gt; will return NULL for all YEAR &amp;lt;&amp;gt; 2010, and adding NULL to something returns NULL (rangesum will handle this gracefully).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 20:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-or-where/m-p/435016#M1162677</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-19T20:57:51Z</dc:date>
    </item>
  </channel>
</rss>

