<?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: variable mixed in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/variable-mixed-in-set-analysis/m-p/283880#M105494</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Sum({&amp;lt;[CLASE DE VENDEDOR]={'NACIONALES'}, DATE={'$(VDIAANTERIOR)'}&amp;gt;}Ventas) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;WARNING&lt;/STRONG&gt;&lt;/SPAN&gt;:&amp;nbsp; Using now() in a chart like this is dangerous.&amp;nbsp; In its default mode, now() updates every second.&amp;nbsp; That means your chart must be recalculated every second.&amp;nbsp; If it takes a second or more to calculate this chart, it will max out your CPU time.&amp;nbsp; Also realize that now() returns a timestamp, not a date.&amp;nbsp; While the date() function will format it as a date, and my changes above will then ignore the time portion, the time portion still exists.&amp;nbsp; You could do floor(now(2)), but you might as well just use the today() function.&amp;nbsp; The default mode of the today() function is also CPU friendly, in that it only checks the date when the document is opened.&amp;nbsp; What I would do is skip the variable completely, and code it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;[CLASE DE VENDEDOR]={'NACIONALES'}, DATE={'$(=date(today()-1))'}&amp;gt;} Ventas) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jun 2011 19:41:16 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-06-13T19:41:16Z</dc:date>
    <item>
      <title>variable mixed in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-mixed-in-set-analysis/m-p/283879#M105493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im a new user of QV, i hope you solve this problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get and expression for previous day?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have sales from a period and use set analysis to select certain group of salesman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same table y need to shown the sales of yesterday, for these group of salesman.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;[CLASE DE VENDEDOR]={'NACIONALES'}, DATE=VDIAANTERIOR&amp;gt;}Ventas) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;the variable = VDIAANTERIOR=Date(Now()-1)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This doesnt work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HELP PLEASE.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&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;P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;&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/14357#14357"&gt;How do I get an expression for previous month sales?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2011 17:38:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-mixed-in-set-analysis/m-p/283879#M105493</guid>
      <dc:creator />
      <dc:date>2011-06-13T17:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: variable mixed in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-mixed-in-set-analysis/m-p/283880#M105494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Sum({&amp;lt;[CLASE DE VENDEDOR]={'NACIONALES'}, DATE={'$(VDIAANTERIOR)'}&amp;gt;}Ventas) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;WARNING&lt;/STRONG&gt;&lt;/SPAN&gt;:&amp;nbsp; Using now() in a chart like this is dangerous.&amp;nbsp; In its default mode, now() updates every second.&amp;nbsp; That means your chart must be recalculated every second.&amp;nbsp; If it takes a second or more to calculate this chart, it will max out your CPU time.&amp;nbsp; Also realize that now() returns a timestamp, not a date.&amp;nbsp; While the date() function will format it as a date, and my changes above will then ignore the time portion, the time portion still exists.&amp;nbsp; You could do floor(now(2)), but you might as well just use the today() function.&amp;nbsp; The default mode of the today() function is also CPU friendly, in that it only checks the date when the document is opened.&amp;nbsp; What I would do is skip the variable completely, and code it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;[CLASE DE VENDEDOR]={'NACIONALES'}, DATE={'$(=date(today()-1))'}&amp;gt;} Ventas) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2011 19:41:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-mixed-in-set-analysis/m-p/283880#M105494</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-06-13T19:41:16Z</dc:date>
    </item>
  </channel>
</rss>

