<?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 Calculated Formula or Script ? [printscreens, tables attached] in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-Formula-or-Script-printscreens-tables-attached/m-p/212804#M66683</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aron,&lt;/P&gt;&lt;P&gt;it works well ! Thank you &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt;&lt;/P&gt;&lt;P&gt;Last question (before to verified the answer &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt; ) :&lt;/P&gt;&lt;P&gt;If I want to to make a difference between the first value of next day and the first value of current day instead of "sum" function&lt;/P&gt;&lt;P&gt;Example : (Assuming we have the same table)&lt;/P&gt;&lt;P&gt;I would like to get :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P style="text-align: center"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P style="text-align: center"&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P style="text-align: center"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;13/03/2011&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;Machine A&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;502&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;14/03/2011&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;Machine B&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;-&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;...&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;502 because 625 - 123 for Machine A&lt;BR /&gt;- because x - 625&lt;BR /&gt;and so on&lt;/P&gt;&lt;P&gt;Is it more difficult ?&lt;/P&gt;&lt;P&gt;My aim is not to ask you to do my work but to understand how it works for expression&lt;/P&gt;&lt;P&gt;Thank you again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Apr 2011 10:36:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-13T10:36:29Z</dc:date>
    <item>
      <title>Calculated Formula or Script ? [printscreens, tables attached]</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Formula-or-Script-printscreens-tables-attached/m-p/212801#M66680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everybody,&lt;/P&gt;&lt;P&gt;Assume that I want to import data from the Excel file named data.xlsx :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;STRONG&gt;Hour&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;STRONG&gt;13/03/2011&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;00 :00 :00&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;123&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;Machine A&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;STRONG&gt;13/03/2011&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;00 :00 :00&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;698&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;Machine B&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;STRONG&gt;13/03/2011&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;01 :00 :00&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;178&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;Machine A&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;STRONG&gt;13/03/2011&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;01 :00 :00&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;720&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;Machine B&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;STRONG&gt;14/03/2011&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;00 :00 :00&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;625&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;Machine A&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="154"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;First, I would like to calculate the "sum" of "Value" everyday for each Name.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Idea number 1 : Import raw data and then use Calculated Formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;&lt;BR /&gt;LOAD Date,&lt;BR /&gt; Hour,&lt;BR /&gt; Value,&lt;BR /&gt; Name&lt;BR /&gt;FROM data.xlsx (ooxml, embedded labels, table is Sheet1);&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Calculated formula will be something like this :&lt;BR /&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;=sum(Value)&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;Idea number 2 : Import raw data and then use Calculated Formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold;"&gt;&lt;/P&gt;&lt;P&gt;LOAD Date,&lt;BR /&gt; Hour,&lt;BR /&gt; Value,&lt;BR /&gt; sum(Value) as Cumul,&lt;BR /&gt; Name&lt;/P&gt;&lt;P&gt;FROM data.xlsx GROUP BY DATE&amp;amp;Name (ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Questions&lt;/P&gt;&lt;P&gt;Does it make sense ?&lt;BR /&gt;If yes, can you help me with the syntax&lt;BR /&gt;If not, can you explain me&lt;/P&gt;&lt;P&gt;[:)]&lt;/P&gt;&lt;P&gt;Last thing, what I can do with "expression" in =sum({expression} Value);&lt;BR /&gt;Some people use the sign "$" what is it ?&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Jeremy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 09:13:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Formula-or-Script-printscreens-tables-attached/m-p/212801#M66680</guid>
      <dc:creator />
      <dc:date>2011-04-13T09:13:04Z</dc:date>
    </item>
    <item>
      <title>Calculated Formula or Script ? [printscreens, tables attached]</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Formula-or-Script-printscreens-tables-attached/m-p/212802#M66681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG&gt;jeremy02&lt;/STRONG&gt; ,&lt;/P&gt;&lt;P&gt;Use the below code it works fine, i think..&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Name,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(Value) as Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM SourceFileName GROUP BY Name,Date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;About $:&lt;/P&gt;&lt;P&gt;if we create a variable like...&lt;/P&gt;&lt;P&gt;let i=10;&lt;/P&gt;&lt;P&gt;and later if we want to use the value of that variable, we simply write like this..&lt;/P&gt;&lt;P&gt;j=j+$(i);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 09:34:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Formula-or-Script-printscreens-tables-attached/m-p/212802#M66681</guid>
      <dc:creator />
      <dc:date>2011-04-13T09:34:47Z</dc:date>
    </item>
    <item>
      <title>AW:Calculated Formula or Script ? [printscreens, tables attached]</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Formula-or-Script-printscreens-tables-attached/m-p/212803#M66682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jeremy,&lt;/P&gt;&lt;P&gt;I suppose you are at the beginning of your affair with QV &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; But to answer your questions:&lt;/P&gt;&lt;P&gt;Idea 1 or 2:&lt;/P&gt;&lt;P&gt;If there are no reasons like avoiding heavy load(-times) or performance problems I would load the raw data. This offers you the best flexibilty, one strength of QV. Unlke other BI-Tools you do not have to predefine any aggregation, cube or sth else during the loadprocess, with some exceptions like mentioned above. It is possible, like Arun said, but not necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;jeremy02 wrote:Last thing, what I can do with "expression" in =sum({expression} Value);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Within the brackets {} reside expressions belonging to the so called SET Analysis, a very powerful feature to precise what to do within your aggr-functions. See Help/Manuals for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;jeremy02 wrote:Some people use the sign "$" what is it ?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The $()-Operator is used to indicate a variable. So $(vPrevWeek) is used in a expression and will return eg. 201114 when the (Text-)value of the variable vPrevWeek is "Week( Today()) -1". Again, don't hesitate to look for more details into the Help.&lt;/P&gt;&lt;P&gt;For testing it is often useful to write the expression within a textbox (with a leading "=" ).&lt;/P&gt;&lt;P&gt;HtH for the next steps&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 10:28:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Formula-or-Script-printscreens-tables-attached/m-p/212803#M66682</guid>
      <dc:creator />
      <dc:date>2011-04-13T10:28:39Z</dc:date>
    </item>
    <item>
      <title>Calculated Formula or Script ? [printscreens, tables attached]</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Formula-or-Script-printscreens-tables-attached/m-p/212804#M66683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aron,&lt;/P&gt;&lt;P&gt;it works well ! Thank you &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt;&lt;/P&gt;&lt;P&gt;Last question (before to verified the answer &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt; ) :&lt;/P&gt;&lt;P&gt;If I want to to make a difference between the first value of next day and the first value of current day instead of "sum" function&lt;/P&gt;&lt;P&gt;Example : (Assuming we have the same table)&lt;/P&gt;&lt;P&gt;I would like to get :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P style="text-align: center"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P style="text-align: center"&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P style="text-align: center"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;13/03/2011&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;Machine A&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;502&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;14/03/2011&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;Machine B&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;-&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;...&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;502 because 625 - 123 for Machine A&lt;BR /&gt;- because x - 625&lt;BR /&gt;and so on&lt;/P&gt;&lt;P&gt;Is it more difficult ?&lt;/P&gt;&lt;P&gt;My aim is not to ask you to do my work but to understand how it works for expression&lt;/P&gt;&lt;P&gt;Thank you again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 10:36:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Formula-or-Script-printscreens-tables-attached/m-p/212804#M66683</guid>
      <dc:creator />
      <dc:date>2011-04-13T10:36:29Z</dc:date>
    </item>
  </channel>
</rss>

