<?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 Use loaded data for calculations in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252660#M1190825</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the answer, but the problem is a differnet one.&lt;/P&gt;&lt;P&gt;let me try to explain it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value 1 is always before value 2&lt;/P&gt;&lt;P&gt;the transromation process before is needed as the values which i get from the db is not usabel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value 1: 2011-01-01, value 2: 2011-01-03&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value 3: should be 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Aug 2011 11:21:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-05T11:21:08Z</dc:date>
    <item>
      <title>Use loaded data for calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252658#M1190823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, i'm new to qlikview and fighting with a little problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm loading data and transforming it with a formular and name it as value1, value2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;afterwards i what to calculate a value 3 which is the difference between the two values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value1&lt;/P&gt;&lt;P&gt;﻿﻿﻿makedate(year(left(datecomplete,10)),month(left(datacomplete,10)),day(left(datecomplete,10))) AS VALUE1&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;value2&lt;/P&gt;&lt;P&gt;the same als value 1, just from a different field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i'm using now the formulare&lt;/P&gt;&lt;P&gt;networkdays(value1,value2),&lt;/P&gt;&lt;P&gt;the script they no value 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;florian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 10:24:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252658#M1190823</guid>
      <dc:creator />
      <dc:date>2011-08-05T10:24:12Z</dc:date>
    </item>
    <item>
      <title>Use loaded data for calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252659#M1190824</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;&amp;nbsp;&amp;nbsp; Qlikview returns the correct answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Let me explain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; As you said you have Value1 and Value2 same as Value1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; So consider that your Value1 is 2011-01-01 so your value2 will be the same i.e 2011-01-01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Now when you use Networkdays(Value1,Value2). If we put values in this expression, it becomes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Networkdays(2011-01-01,2011-01-01) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; So the result of the above expression is 1. As there is only one day in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Syntax of Networkdays()&amp;nbsp; is &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; networkdays&lt;A name="kanchor523"&gt;&lt;/A&gt;&lt;A name="networkdays"&gt;&lt;/A&gt; ( &lt;SPAN style="font-style: italic;"&gt;start:date, end_date {, holiday}&lt;/SPAN&gt; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Hope you understood.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 10:56:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252659#M1190824</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-08-05T10:56:48Z</dc:date>
    </item>
    <item>
      <title>Use loaded data for calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252660#M1190825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the answer, but the problem is a differnet one.&lt;/P&gt;&lt;P&gt;let me try to explain it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value 1 is always before value 2&lt;/P&gt;&lt;P&gt;the transromation process before is needed as the values which i get from the db is not usabel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value 1: 2011-01-01, value 2: 2011-01-03&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value 3: should be 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 11:21:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252660#M1190825</guid>
      <dc:creator />
      <dc:date>2011-08-05T11:21:08Z</dc:date>
    </item>
    <item>
      <title>Use loaded data for calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252661#M1190826</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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Can you please elobrate the problem as i am not clear with what ever you said.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please use example if possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 12:05:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252661#M1190826</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-08-05T12:05:05Z</dc:date>
    </item>
    <item>
      <title>Use loaded data for calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252662#M1190827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here a screenshot from the script&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2011-08-05_142000.jpg" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/6300_2011-08-05_142000.jpg" width="450" /&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 12:22:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252662#M1190827</guid>
      <dc:creator />
      <dc:date>2011-08-05T12:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Use loaded data for calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252663#M1190828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still somewhat new to qlikview, but try inserting your formulas &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿﻿﻿makedate(year(left(datecomplete,10)),month(left(datacomplete,10)),day(left(datecomplete,10)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into your networkdays formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Networkdays(﻿﻿﻿makedate(year(left(datecomplete,10)),month(left(datacomplete,10)),day(left(datecomplete,10))),﻿﻿﻿makedate(year(left(senddate,10)),month(left(senddate,10)),day(left(senddate,10))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From what I have noticed about qlikview, if you define something earlier in the script, unless you set it to a variable it does not matter if it is later in the same load statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: marcsliving&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 12:27:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252663#M1190828</guid>
      <dc:creator />
      <dc:date>2011-08-05T12:27:59Z</dc:date>
    </item>
    <item>
      <title>Use loaded data for calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252664#M1190829</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;&amp;nbsp;&amp;nbsp;&amp;nbsp; The image is not that clear, and it is also cut from the left side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; One thing i saw from this image is that the date you are using in the networkdays are calcluated, right..?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if yes, then instead of using the name use the full calculation. Meaning something like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For example &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; load &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Makedate(2011,01,05) as&amp;nbsp; Startdate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Makedate(2011,01,01) as Enddate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Networkdate(Makedate(2011,01,05),Makedate(2011,01,01)) as Difference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; From xyz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 12:28:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252664#M1190829</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-08-05T12:28:43Z</dc:date>
    </item>
    <item>
      <title>Use loaded data for calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252665#M1190830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; that would probably work, but as i've to make various calculations i don't want to work all the time with the whole expression. what do you meen with variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 12:37:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252665#M1190830</guid>
      <dc:creator />
      <dc:date>2011-08-05T12:37:16Z</dc:date>
    </item>
    <item>
      <title>Use loaded data for calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252666#M1190831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean by work all the time with whole expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Networkdays(﻿﻿﻿makedate(year(left(datecomplete,10)),month(left(datacomplete,10)),day(left(datecomplete,10))),﻿﻿﻿makedate(year(left(senddate,10)),month(left(senddate,10)),day(left(senddate,10)))) as&amp;nbsp; datedifference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will set the number of days different as a field that you can use in the application. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 12:45:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252666#M1190831</guid>
      <dc:creator />
      <dc:date>2011-08-05T12:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Use loaded data for calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252667#M1190832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A couple suggestions. When you want to do calculations with a computed field, use preceding load to reference the new field and avoid repeating expressions. See &lt;A href="http://qlikviewnotes.blogspot.com/2009/12/simplify-with-preceeding-load.html"&gt;http://qlikviewnotes.blogspot.com/2009/12/simplify-with-preceeding-load.html&lt;/A&gt; for more on preceding load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your use of MakeDate() MakeTime() in the script seems overly complex. It looks like you already have timestamp values in DATECOMPLETE and DATECREATED. So the difference is just:&lt;/P&gt;&lt;P&gt;DATECOMPLETE - DATECREATED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to work with whole days only:&lt;/P&gt;&lt;P&gt;floor(DATECOMPLETE) - floor(DATECREATED)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 16:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-loaded-data-for-calculations/m-p/252667#M1190832</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2011-08-05T16:07:35Z</dc:date>
    </item>
  </channel>
</rss>

