<?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: Decimal numbers in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083647#M360892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As its current form, it seems to be read as string, try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ASD:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Id,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Num(Quantity) as Quantity;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Id, Quantity&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 1, 0.0000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 2, 0.0000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 3, 0.0002&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 4, 1.0002&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 5, 1.0000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Apr 2016 20:43:41 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-04-08T20:43:41Z</dc:date>
    <item>
      <title>Decimal numbers in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083646#M360891</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 trying to figure out how to get all rows with zero values using set analysis. Say I have a table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASD:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp; Id, Quantity&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1, 0.0000&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2, 0.0000&lt;/P&gt;&lt;P&gt;&amp;nbsp; 3, 0.0002&lt;/P&gt;&lt;P&gt;&amp;nbsp; 4, 1.0002&lt;/P&gt;&lt;P&gt;&amp;nbsp; 5, 1.0000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression: sum({&amp;lt;Quantity = {0}&amp;gt;} 1) will not return any rows. However, this will: sum({&amp;lt;Quantity = {'0.0000'}&amp;gt;} 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So apparently QV treats the field as a string in the set analysis. In all other calculations the field is treated as a number (for example IF(Quantity = 0, 1) will work. How can I get the first expression to work, or what would be the best alternate solution? I'm working with large tables so I'm trying to find the solution with the best performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 19:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083646#M360891</guid>
      <dc:creator />
      <dc:date>2016-04-08T19:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal numbers in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083647#M360892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As its current form, it seems to be read as string, try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ASD:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Id,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Num(Quantity) as Quantity;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Id, Quantity&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 1, 0.0000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 2, 0.0000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 3, 0.0002&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 4, 1.0002&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 5, 1.0000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 20:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083647#M360892</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-08T20:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal numbers in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083648#M360893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to prove your theory I used the following set analysis to get 0.0002&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Id={'3'}&amp;gt;} Quantity) + sum({&amp;lt;Id={'1'}&amp;gt;} Quantity) &lt;/P&gt;&lt;P&gt;so the quality as treated as numbers. I am not sure what your question is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 20:46:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083648#M360893</guid>
      <dc:creator>alexpanjhc</dc:creator>
      <dc:date>2016-04-08T20:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal numbers in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083649#M360894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve, in SET Analysis set modifiers always expect same format of the modifier field. Good Example is Date or Time stamp field modifiers &lt;/P&gt;&lt;P&gt;So I am not surprised why set analysis is not working in your case &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;sum({&amp;lt;Quantity = {'0.0000'}&amp;gt;} 1) vs &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum({&amp;lt;Quantity = {0}&amp;gt;} 1)&lt;/SPAN&gt; .&lt;/STRONG&gt;&lt;/SPAN&gt; I would suggest add the flag field to satisfy your condition and use the flag in the Set Modifier.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 20:52:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083649#M360894</guid>
      <dc:creator />
      <dc:date>2016-04-08T20:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal numbers in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083650#M360895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put another way, set analysis does field comparison as a text comparison, even on numeric/date fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I normally would just use Quantity={'0.0000'}. But I agree with using a flag for maximum performance. As I recall, fastest is true()/null() as your true/false values, then QuantityZeroFlag={'-1'}, since true()=-1. I remember there being speed differences between QlikView versions, though, and it's been years since I've tested the speed of different flag options myself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 23:05:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083650#M360895</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-04-08T23:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal numbers in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083651#M360896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve, you can also use SET analysis for this. Please find the below:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count({&amp;lt;Quantity={"=Num(Quantity)=0"}&amp;gt;}Id)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can write 0.* in SET analysis, but it will count Quantity starting with 0.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;=Count({&amp;lt;Quantity={"0.*"}&amp;gt;}Id)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Apr 2016 00:39:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083651#M360896</guid>
      <dc:creator />
      <dc:date>2016-04-09T00:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal numbers in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083652#M360897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As others already mentioned, that's the way QV is currently doing field value comparison in set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you follow the discussions in the forum, you'll see that this is probably #1 of user issues with set analysis&lt;/P&gt;&lt;P&gt;(i.e. struggling to get the field modifier element list matching with field values, e.g. on dates / timestamps.&lt;/P&gt;&lt;P&gt;See also: &lt;A href="https://community.qlik.com/qlik-blogpost/4394"&gt;Dates in Set Analysis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really hope Qlik will simplify this part someday soon, at least HIC agreed there's a need to work on that in another discussion. I believe he can drive things into this direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As others already mentioned, you can create a flag in the script or use an advanced search in the field modifier (you don't need num() here, so &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Count({&amp;lt;Quantity={"=Quantity=0"}&amp;gt;} Id) &lt;/STRONG&gt;should do).&lt;/P&gt;&lt;P&gt;If you are specifically interested in the zero Quantity values, a flag is probably the best solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Apr 2016 11:54:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083652#M360897</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-09T11:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal numbers in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083653#M360898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm indeed only interested to pick the rows where quantity is exactly zero, and I ended up using a flag, which works (but not the prettiest solution for me, since I actually have multiple Quantity-columns for which I have to make a flag for each, but that's another matter)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Apr 2016 12:22:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decimal-numbers-in-set-analysis/m-p/1083653#M360898</guid>
      <dc:creator />
      <dc:date>2016-04-09T12:22:40Z</dc:date>
    </item>
  </channel>
</rss>

