<?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 Print 0 when get negative values in Front End in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Print-0-when-get-negative-values-in-Front-End/m-p/47324#M7885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the below expression and I want to print 0 when values is negative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression : &lt;STRONG&gt;Sum({&amp;lt;NumDateKey={"&amp;gt;=$(=vFromDate)&amp;lt;=$(=vToDate)"}&amp;gt;} [9LE Bulk Vol])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If above Expression gives -16.5 or 0 then show me 0 else show me actual value or 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can Achieve this by using&amp;nbsp; below expression. But i dont want to use If function as it will take long time to process the data in front end end. I wanted to achieve this without If condition...&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;If( Sum({&amp;lt;NumDateKey={"&amp;gt;=$(=vFromDate)&amp;lt;=$(=vToDate)"}&amp;gt;} [9LE Bulk Vol])&amp;nbsp; &amp;lt;=0,0,1) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;Also, I can't do it in back end also like below because it is running on dynamic date selection based on user input&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;If(&amp;nbsp; [9LE Bulk Vol] &amp;lt;=0,0,1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;Suppose user Select 15-04-2018&amp;nbsp; then&amp;nbsp; from_date and To_date is calculated like below . And every time user will select different date and based on that user input the expression will give the result and on that result we have to implement if negative value then 0 else 1.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From_date = &lt;SPAN style="font-size: 13.3333px;"&gt;(15-04-2018) -91&amp;nbsp; = 14-01-2018 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;To_date =&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;15-04-2018 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;So expression becomes like this &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Sum({&amp;lt;NumDateKey={"&amp;gt;=(&lt;SPAN style="font-size: 13.3333px;"&gt;14-01-2018&lt;/SPAN&gt;)&amp;lt;=(&lt;SPAN style="font-size: 13.3333px;"&gt;15-04-2018&lt;/SPAN&gt;)"}&amp;gt;} [9LE Bulk Vol])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Can anybody tell me how we can achieve whithout If condition in front end . help would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sarfaraz&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2018 07:34:16 GMT</pubDate>
    <dc:creator>sarfaraz_sheikh</dc:creator>
    <dc:date>2018-05-03T07:34:16Z</dc:date>
    <item>
      <title>Print 0 when get negative values in Front End</title>
      <link>https://community.qlik.com/t5/QlikView/Print-0-when-get-negative-values-in-Front-End/m-p/47324#M7885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the below expression and I want to print 0 when values is negative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression : &lt;STRONG&gt;Sum({&amp;lt;NumDateKey={"&amp;gt;=$(=vFromDate)&amp;lt;=$(=vToDate)"}&amp;gt;} [9LE Bulk Vol])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If above Expression gives -16.5 or 0 then show me 0 else show me actual value or 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can Achieve this by using&amp;nbsp; below expression. But i dont want to use If function as it will take long time to process the data in front end end. I wanted to achieve this without If condition...&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;If( Sum({&amp;lt;NumDateKey={"&amp;gt;=$(=vFromDate)&amp;lt;=$(=vToDate)"}&amp;gt;} [9LE Bulk Vol])&amp;nbsp; &amp;lt;=0,0,1) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;Also, I can't do it in back end also like below because it is running on dynamic date selection based on user input&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;If(&amp;nbsp; [9LE Bulk Vol] &amp;lt;=0,0,1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;Suppose user Select 15-04-2018&amp;nbsp; then&amp;nbsp; from_date and To_date is calculated like below . And every time user will select different date and based on that user input the expression will give the result and on that result we have to implement if negative value then 0 else 1.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From_date = &lt;SPAN style="font-size: 13.3333px;"&gt;(15-04-2018) -91&amp;nbsp; = 14-01-2018 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;To_date =&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;15-04-2018 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;So expression becomes like this &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Sum({&amp;lt;NumDateKey={"&amp;gt;=(&lt;SPAN style="font-size: 13.3333px;"&gt;14-01-2018&lt;/SPAN&gt;)&amp;lt;=(&lt;SPAN style="font-size: 13.3333px;"&gt;15-04-2018&lt;/SPAN&gt;)"}&amp;gt;} [9LE Bulk Vol])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Can anybody tell me how we can achieve whithout If condition in front end . help would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sarfaraz&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2018 07:34:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Print-0-when-get-negative-values-in-Front-End/m-p/47324#M7885</guid>
      <dc:creator>sarfaraz_sheikh</dc:creator>
      <dc:date>2018-05-03T07:34:16Z</dc:date>
    </item>
  </channel>
</rss>

