<?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 Calculate Variable in Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-Variable-in-Table/m-p/263241#M99013</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Marco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only a little help: your expression in script is nice but not needed, QlikView has an interpreter function for dates and numbers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date means the format you want to store&lt;/P&gt;&lt;P&gt;Date# means in which format date is in the source stored&lt;/P&gt;&lt;P&gt;Date(Date#(DATE_1,'YYYYMMDD'),'DD-MM-YYYY') As DATE_1_CORRECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num(Num#('1.234,56','#.##0,00'),'#,##0.00') As Number&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jul 2011 08:42:37 GMT</pubDate>
    <dc:creator>brenner_martina</dc:creator>
    <dc:date>2011-07-07T08:42:37Z</dc:date>
    <item>
      <title>Calculate Variable in Table</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Variable-in-Table/m-p/263240#M99012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i have this problem to calculate a variable.&lt;/P&gt;&lt;P&gt;In My Data Base I have 2 Date: DATE_1 and DATE_2. View example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The date format is yyyymmdd.&lt;/P&gt;&lt;P&gt;I import them and trasform using the formula: &lt;/P&gt;&lt;P&gt;MAKEDATE(LEFT([DATE_1],4),MID([DATE_1],5,2),RIGHT([DATE_1],2)) AS DATE_1_CORRECT,&lt;BR /&gt;MAKEDATE(LEFT([DATE_2],4),MID([DATE_2],5,2),RIGHT([DATE_2],2)) AS DATE_2_CORRECT,&lt;BR /&gt;LEFT([DATE_1.],4) as YEAR_DATE_1,&lt;BR /&gt;LEFT([DATE_2],4) as YEAR_DATE_2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now a i want to create a variable "DIFF" of the difference of 2 date and anylize the mean (AVG) of DIFF in days for each ID.&lt;/P&gt;&lt;P&gt;I want this mean for each iD only if "DIFF" variable&amp;nbsp; is &amp;gt; 5 or &amp;lt; 200 and year_date_1 = 2010,2011 and year_date_2 = 2010,2011&lt;/P&gt;&lt;P&gt;I think to use DATE_1_CORRECT - DATE_2_CORRECT.&lt;BR /&gt;I need only a table to analyize this mean. Is not important to create a variable when i import the data base.&lt;BR /&gt;In the example i make a table of mean of differnce for each id but without conditions...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Who can help me?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2011 08:31:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Variable-in-Table/m-p/263240#M99012</guid>
      <dc:creator />
      <dc:date>2011-07-07T08:31:59Z</dc:date>
    </item>
    <item>
      <title>Calculate Variable in Table</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Variable-in-Table/m-p/263241#M99013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Marco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only a little help: your expression in script is nice but not needed, QlikView has an interpreter function for dates and numbers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date means the format you want to store&lt;/P&gt;&lt;P&gt;Date# means in which format date is in the source stored&lt;/P&gt;&lt;P&gt;Date(Date#(DATE_1,'YYYYMMDD'),'DD-MM-YYYY') As DATE_1_CORRECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num(Num#('1.234,56','#.##0,00'),'#,##0.00') As Number&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2011 08:42:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Variable-in-Table/m-p/263241#M99013</guid>
      <dc:creator>brenner_martina</dc:creator>
      <dc:date>2011-07-07T08:42:37Z</dc:date>
    </item>
    <item>
      <title>Calculate Variable in Table</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Variable-in-Table/m-p/263242#M99014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've already try this and it's ok!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2011 08:57:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Variable-in-Table/m-p/263242#M99014</guid>
      <dc:creator />
      <dc:date>2011-07-07T08:57:55Z</dc:date>
    </item>
  </channel>
</rss>

