<?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: SQL table origined field returns the correct answer but gives a minus value? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/SQL-table-origined-field-returns-the-correct-answer-but-gives-a/m-p/1270239#M26094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample where you are seeing this weird behavior?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Mar 2017 15:14:39 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-03-10T15:14:39Z</dc:date>
    <item>
      <title>SQL table origined field returns the correct answer but gives a minus value?</title>
      <link>https://community.qlik.com/t5/App-Development/SQL-table-origined-field-returns-the-correct-answer-but-gives-a/m-p/1270238#M26093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a strange outcome in a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I do Sum(Counter) I get a minus value with the correct answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for example the SQL table may look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="150" style="border: 1px solid rgb(0, 0, 0); width: 168px; height: 110px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;ID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Counter&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1212&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3434&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;6342&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;6722&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3497&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I do Sum(Counter) in the UI I am expecting a 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I get a -5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried making sure the counter field is a Num by wrapping the function around the field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also did If(Counter = 1, 1,0) but it does not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 15:11:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/SQL-table-origined-field-returns-the-correct-answer-but-gives-a/m-p/1270238#M26093</guid>
      <dc:creator>jblomqvist</dc:creator>
      <dc:date>2017-03-10T15:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: SQL table origined field returns the correct answer but gives a minus value?</title>
      <link>https://community.qlik.com/t5/App-Development/SQL-table-origined-field-returns-the-correct-answer-but-gives-a/m-p/1270239#M26094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample where you are seeing this weird behavior?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 15:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/SQL-table-origined-field-returns-the-correct-answer-but-gives-a/m-p/1270239#M26094</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-10T15:14:39Z</dc:date>
    </item>
  </channel>
</rss>

