<?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: Avoid to expand data to work with dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406158#M491736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, it is exactly what I was looking for. &lt;/P&gt;&lt;P&gt;One more question about this please. I think the function "=Avg(BASE)" is giving me the amount of (75+77)/2=76. How could I get a ponderate average according to the FECHA range I could select in designer dynamically? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I am analysing a period FFPE-FIPE=24 involving, &lt;/P&gt;&lt;P&gt;4 days for 75 , &lt;/P&gt;&lt;P&gt;8 days for both prices &lt;/P&gt;&lt;P&gt;and 12 days 77&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where the right result should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(75x4 + &lt;STRONG&gt;((75+77)/2)x8 &lt;/STRONG&gt;+ 77x12) = 76,33333&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Sep 2012 11:33:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-09-17T11:33:09Z</dc:date>
    <item>
      <title>Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406155#M491733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt;Good morning, I am looking for a piece of script about “master calendars” or a similar solution to the following problem:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt;My BBDD data source generates rows or records like these&amp;nbsp; (date format dd/mm/yy):&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="622"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="16" width="40"&gt;HOTEL&lt;/TD&gt;&lt;TD class="xl66" width="25"&gt;M&lt;/TD&gt;&lt;TD class="xl66" width="61"&gt;MCDO&lt;/TD&gt;&lt;TD class="xl66" width="49"&gt;TO&lt;/TD&gt;&lt;TD class="xl66" width="134"&gt;TTOO&lt;/TD&gt;&lt;TD class="xl66" width="31"&gt;ID&lt;/TD&gt;&lt;TD class="xl66" width="91"&gt;CTO&lt;/TD&gt;&lt;TD class="xl66" width="65"&gt;FIPE&lt;/TD&gt;&lt;TD class="xl66" width="65"&gt;FFPE&lt;/TD&gt;&lt;TD class="xl66" width="28"&gt;THA&lt;/TD&gt;&lt;TD class="xl66" width="33"&gt;BASE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl66"&gt;ALE&lt;/TD&gt;&lt;TD class="xl66"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl66"&gt;AIM&lt;/TD&gt;&lt;TD class="xl66"&gt;THOMAS COOK AG (AIM)&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;8213&lt;/TD&gt;&lt;TD class="xl66"&gt;AIMTULS12&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;01/05/2012&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;08/05/2012&lt;/TD&gt;&lt;TD class="xl66"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;75&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl66"&gt;ALE&lt;/TD&gt;&lt;TD class="xl66"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl66"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl66"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;3614&lt;/TD&gt;&lt;TD class="xl66"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl66"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;77&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt;Where the Price (BASE) is 75 y 77 for the periods included between FIPE (Begining Period Date) and FFPE (Ending Period Date) respectively, that means, for the first record or row the valid price (BASE) is 75 during 8 days and for the second record the valid price is 77 during 20 days.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt;Summarizing, in order to analyze Price averages for&amp;nbsp; differents periods etc the only way I found was to join a new column called FECHA (DATE) and transformate the original BBDD table in this other:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="687"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="16" width="40"&gt;HOTEL&lt;/TD&gt;&lt;TD class="xl65" width="25"&gt;M&lt;/TD&gt;&lt;TD class="xl65" width="61"&gt;MCDO&lt;/TD&gt;&lt;TD class="xl65" width="49"&gt;TO&lt;/TD&gt;&lt;TD class="xl65" width="134"&gt;TTOO&lt;/TD&gt;&lt;TD class="xl65" width="31"&gt;ID&lt;/TD&gt;&lt;TD class="xl65" width="91"&gt;CTO&lt;/TD&gt;&lt;TD class="xl65" width="65"&gt;FIPE&lt;/TD&gt;&lt;TD class="xl65" width="65"&gt;FFPE&lt;/TD&gt;&lt;TD class="xl65" width="28"&gt;THA&lt;/TD&gt;&lt;TD class="xl65" width="33"&gt;BASE&lt;/TD&gt;&lt;TD class="xl65" width="65"&gt;FECHA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;AIM&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (AIM)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;8213&lt;/TD&gt;&lt;TD class="xl65"&gt;AIMTULS12&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/05/2012&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;08/05/2012&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;75&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/01/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;AIM&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (AIM)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;8213&lt;/TD&gt;&lt;TD class="xl65"&gt;AIMTULS12&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/05/2012&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;08/05/2012&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;75&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;02/01/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;AIM&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (AIM)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;8213&lt;/TD&gt;&lt;TD class="xl65"&gt;AIMTULS12&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/05/2012&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;08/05/2012&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;75&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;03/01/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;AIM&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (AIM)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;8213&lt;/TD&gt;&lt;TD class="xl65"&gt;AIMTULS12&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/05/2012&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;08/05/2012&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;75&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;04/01/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;AIM&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (AIM)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;8213&lt;/TD&gt;&lt;TD class="xl65"&gt;AIMTULS12&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/05/2012&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;08/05/2012&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;75&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;05/01/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;AIM&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (AIM)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;8213&lt;/TD&gt;&lt;TD class="xl65"&gt;AIMTULS12&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/05/2012&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;08/05/2012&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;75&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;06/01/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;AIM&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (AIM)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;8213&lt;/TD&gt;&lt;TD class="xl65"&gt;AIMTULS12&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/05/2012&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;08/05/2012&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;75&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;07/01/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;AIM&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (AIM)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;8213&lt;/TD&gt;&lt;TD class="xl65"&gt;AIMTULS12&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/05/2012&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;08/05/2012&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;75&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;08/01/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;02/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;03/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;04/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;05/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;06/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;07/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;08/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;09/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;10/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;11/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;12/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;13/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;14/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;15/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;16/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;17/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;18/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;19/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="16"&gt;1&lt;/TD&gt;&lt;TD class="xl65"&gt;ALE&lt;/TD&gt;&lt;TD class="xl65"&gt;ALEMANIA&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHER&lt;/TD&gt;&lt;TD class="xl65"&gt;THOMAS COOK AG (BUC)&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;3614&lt;/TD&gt;&lt;TD class="xl65"&gt;BUCHERTULW11&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;01/11/2011&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;TD class="xl65"&gt;HA&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;77&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;20/11/2011&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt;This way I can deal with dates, data and formulas with total flexibility thanks to the new field FECHA (DATE), but is unbearable for access or excel.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt;Could please anyone suggest me a solution or advice in QV script code to work with dates without having to expand the BBDD data source?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #eef4f9;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: 'Arial','sans-serif'; color: #636363; font-size: 9pt;"&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 16:17:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406155#M491733</guid>
      <dc:creator />
      <dc:date>2012-09-13T16:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406156#M491734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to expand the date ranges, but you do not need to join the date ranges onto the BBDD table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BBDD:&lt;/P&gt;&lt;P&gt;LOAD * FROM [ejemplo.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [DATA_CON_20120905-172847])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;where recno() &amp;lt;= 2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DateRanges: &lt;/P&gt;&lt;P&gt;Load distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FIPE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FFPE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Date(FIPE + iterno() -1) as FECHA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;resident BBDD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;While iterno() &amp;lt;= 1 + FFPE - FIPE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the first LOAD to fit your real data. (Remove the "where recno() &amp;lt;= 2" clause which is just needed for your example file.) You will get a data model with a synthetic key, but this is not a problem - it is instead the most efficient data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Sep 2012 08:34:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406156#M491734</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-09-15T08:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406157#M491735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, it is exactly what I was looking for. &lt;/P&gt;&lt;P&gt;One more question about this please. I think the function "=Avg(BASE)" is giving me the amount of (75+77)/2=76. How could I get a ponderate average according to the FECHA range I could select in designer dynamically? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I am analysing a period FFPE-FIPE=24 involving, &lt;/P&gt;&lt;P&gt;4 days for 75 , &lt;/P&gt;&lt;P&gt;8 days for both prices &lt;/P&gt;&lt;P&gt;and 12 days 77&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where the right result should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(75x4 + &lt;STRONG&gt;((75+77)/2)x8 &lt;/STRONG&gt;+ 77x12) = 76,33333&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 11:32:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406157#M491735</guid>
      <dc:creator />
      <dc:date>2012-09-17T11:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406158#M491736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, it is exactly what I was looking for. &lt;/P&gt;&lt;P&gt;One more question about this please. I think the function "=Avg(BASE)" is giving me the amount of (75+77)/2=76. How could I get a ponderate average according to the FECHA range I could select in designer dynamically? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I am analysing a period FFPE-FIPE=24 involving, &lt;/P&gt;&lt;P&gt;4 days for 75 , &lt;/P&gt;&lt;P&gt;8 days for both prices &lt;/P&gt;&lt;P&gt;and 12 days 77&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where the right result should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(75x4 + &lt;STRONG&gt;((75+77)/2)x8 &lt;/STRONG&gt;+ 77x12) = 76,33333&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 11:33:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406158#M491736</guid>
      <dc:creator />
      <dc:date>2012-09-17T11:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406159#M491737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, it is exactly what I was looking for. &lt;/P&gt;&lt;P&gt;One more question about this please. I think the function "=Avg(BASE)" will give me the amount of (75+77)/2=76. How could I get a ponderate average according to the range of FECHA I could select in designer dynamically? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I am analysing a period FFPE-FIPE=24 involving, &lt;/P&gt;&lt;P&gt;4 days for 75 , &lt;/P&gt;&lt;P&gt;8 days for both prices &lt;/P&gt;&lt;P&gt;and 12 days 77&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where the right result should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(75x4 + &lt;STRONG&gt;((75+77)/2)x8 &lt;/STRONG&gt;+ 77x12) = 76,33333&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 11:36:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406159#M491737</guid>
      <dc:creator />
      <dc:date>2012-09-17T11:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406160#M491738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, it is exactly what I was looking for. &lt;/P&gt;&lt;P&gt;One more question about this please. I think the function "=Avg(BASE)" will give me the amount of (75+77)/2=76. How could I get a ponderate average according to the range of FECHA I could select in designer dynamically? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I am analysing a period FFPE-FIPE=24 involving, &lt;/P&gt;&lt;P&gt;4 days for 75 , &lt;/P&gt;&lt;P&gt;8 days for both prices &lt;/P&gt;&lt;P&gt;and 12 days 77&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where the right result should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(75x4 + &lt;STRONG&gt;((75+77)/2)x8 &lt;/STRONG&gt;+ 77x12) = 76,33333&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 11:36:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406160#M491738</guid>
      <dc:creator />
      <dc:date>2012-09-17T11:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406161#M491739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your example, BASE is found in a table with only two records. Then QlikVIew will calculate the average over these two records, i.e. Avg(BASE) = (75+77)/2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to make the summation in the other table, then you need to get this field into this table. Just join the two tables (put the word "Join" in front of the second load) and you will have one table with 28 records. Now QlikView will calculate the average to (75*8+77*20)/28 which is almost what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it seems to me as if you want &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;each day&lt;/STRONG&gt;&lt;/SPAN&gt; (not each record) to have the same weight, or? If so, you must use a nested aggregation - first calculate the average for each day, then average over the days. You should use the formula Avg(Aggr(Avg(BASE),FECHA))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 11:59:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406161#M491739</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-09-17T11:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406162#M491740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;Certainly make the join load improve my understanding of the model. With the field 'FECHA' as a part of the main and unic table I think that a simple =avg(BASE) is producing right results except when I choose a FECHA range with no Price, in this case the average include ceros. ¿Is there any way or parameter to get an average without including ceros?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;In the attached example the righr result would be average = 22,87&amp;nbsp; instead of 17,533 as a result of considering 23 BASE values &amp;lt;&amp;gt;0 instead of 30.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 17:24:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406162#M491740</guid>
      <dc:creator />
      <dc:date>2012-09-17T17:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406163#M491741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to exclude zeros, you could use&lt;/P&gt;&lt;P&gt;Avg(if(BASE&amp;lt;&amp;gt;0,BASE))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;Sum(BASE) / Count(if(BASE&amp;lt;&amp;gt;0,BASE))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 20:34:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406163#M491741</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-09-17T20:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406164#M491742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect, now I think I have to create a master calendar linked to FECHA in order to compare months of different years an so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 06:38:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406164#M491742</guid>
      <dc:creator />
      <dc:date>2012-09-18T06:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406165#M491743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect, now I think I have to create a master calendar linked to FECHA in order to compare months of different years an so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 06:38:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406165#M491743</guid>
      <dc:creator />
      <dc:date>2012-09-18T06:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406166#M491744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please one last question,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made the master calendar and I see that the first date of 'FECHA' it takes is not the very first date of all, I assume it is because I am using 'peek' without having ordering BBDD by FECHA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to put ...FROM....ORDER BY FECHA but at that line of the script 'FECHA' do not exists yet so it gives me script error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How could I order by 'FECHA' to make the mastercalendar correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 10:00:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406166#M491744</guid>
      <dc:creator />
      <dc:date>2012-09-18T10:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406167#M491745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you use the following lines to find the first and last date:&lt;/P&gt;&lt;P&gt;let varmindate = num(Peek('FECHA',0,'BBDD'));&lt;/P&gt;&lt;P&gt;let varmaxdate = num(Peek('FECHA',-1,'BBDD'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you replace these by&lt;/P&gt;&lt;P&gt;MinMaxDate:&lt;/P&gt;&lt;P&gt;Load Min(FECHA) as MinFECHA, Max(FECHA) as MaxFECHA resident BBDD;&lt;/P&gt;&lt;P&gt;let varmindate = num(Peek('MinFECHA',-1,'MinMaxDate'));&lt;/P&gt;&lt;P&gt;let varmaxdate = num(Peek('MaxFECHA ',-1,'MinMaxDate'));&lt;/P&gt;&lt;P&gt;Drop Table MinMaxDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 10:17:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406167#M491745</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-09-18T10:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid to expand data to work with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406168#M491746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems there is something wrong with 'varmaxdate', it takes value &amp;lt;NULL&amp;gt; whereas varmindate is 40180 which is right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 10:41:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoid-to-expand-data-to-work-with-dates/m-p/406168#M491746</guid>
      <dc:creator />
      <dc:date>2012-09-18T10:41:56Z</dc:date>
    </item>
  </channel>
</rss>

