<?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 Make 0 (zero) when value is negative in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Make-0-zero-when-value-is-negative/m-p/535191#M1139548</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;I'm looking for a clean formually which turns any value to 0 when the original value goes below 0.&lt;/P&gt;&lt;P&gt;I'm having a dashboard based on a log, and I need to do calculations in the front end (unfortunately) to come to a certain number. Sometimes, when selecting certain dimensions, I'm getting negative values which make sense according to the formula, but can't occur in the real world (eg: -3 registrations).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I could of course work with an if like this:&lt;/P&gt;&lt;P&gt;if(value &amp;lt;= 0, 0, value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... but I wanted to know if their might be a cleaner way to do this as my "value" in the script above is actually a pretty large formula)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Christophe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ps: The value is shown in a text object in my dashboard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Sep 2013 12:36:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-09-18T12:36:08Z</dc:date>
    <item>
      <title>Make 0 (zero) when value is negative</title>
      <link>https://community.qlik.com/t5/QlikView/Make-0-zero-when-value-is-negative/m-p/535191#M1139548</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;I'm looking for a clean formually which turns any value to 0 when the original value goes below 0.&lt;/P&gt;&lt;P&gt;I'm having a dashboard based on a log, and I need to do calculations in the front end (unfortunately) to come to a certain number. Sometimes, when selecting certain dimensions, I'm getting negative values which make sense according to the formula, but can't occur in the real world (eg: -3 registrations).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I could of course work with an if like this:&lt;/P&gt;&lt;P&gt;if(value &amp;lt;= 0, 0, value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... but I wanted to know if their might be a cleaner way to do this as my "value" in the script above is actually a pretty large formula)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Christophe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ps: The value is shown in a text object in my dashboard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 12:36:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-0-zero-when-value-is-negative/m-p/535191#M1139548</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-18T12:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Make 0 (zero) when value is negative</title>
      <link>https://community.qlik.com/t5/QlikView/Make-0-zero-when-value-is-negative/m-p/535192#M1139549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christophe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how about max(0, value)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 12:39:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-0-zero-when-value-is-negative/m-p/535192#M1139549</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2013-09-18T12:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Make 0 (zero) when value is negative</title>
      <link>https://community.qlik.com/t5/QlikView/Make-0-zero-when-value-is-negative/m-p/535193#M1139550</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;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will helps you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rangemax(Value,0) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 12:41:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-0-zero-when-value-is-negative/m-p/535193#M1139550</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-09-18T12:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Make 0 (zero) when value is negative</title>
      <link>https://community.qlik.com/t5/QlikView/Make-0-zero-when-value-is-negative/m-p/535194#M1139551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, thanks for the fast reponses !!&lt;/P&gt;&lt;P&gt;Rangemax did the trick.. !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 12:45:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-0-zero-when-value-is-negative/m-p/535194#M1139551</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-18T12:45:15Z</dc:date>
    </item>
  </channel>
</rss>

