<?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: Get all possible periods, repeating values. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-all-possible-periods-repeating-values/m-p/1300139#M515319</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;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Temp:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; *,&lt;SPAN style="color: #0000ff;"&gt;Previous&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;PERIODO&lt;/SPAN&gt;) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;P_1&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;Previous&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;CUSTO&lt;/SPAN&gt;) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;C_1&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Inline&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[&lt;BR /&gt; CD_PRODUTO,PERIODO,CUSTO&lt;BR /&gt; 1,201601,15&lt;BR /&gt; 1,201606,16&lt;BR /&gt; 1,201609,18&lt;BR /&gt; 2,201604,25&lt;BR /&gt; 2,201606,26&lt;BR /&gt; 2,201610,28&lt;BR /&gt; ]&lt;/SPAN&gt;;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Concatenate&lt;/SPAN&gt;&lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="color: #800000;"&gt;CD_PRODUTO&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;P_1&lt;/SPAN&gt; + &lt;SPAN style="color: #0000ff;"&gt;IterNo&lt;/SPAN&gt;() &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;PERIODO&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;C_1&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;CUSTO&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="color: #008000;"&gt;//Date(MonthStart(Date#(P_1,'YYYYMM'),IterNo()-1),'YYYYMM') as PERIODO1 //if You need PERIODO as Date Field&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Resident&lt;/SPAN&gt; Temp&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;While&lt;/SPAN&gt;&amp;nbsp; (&lt;SPAN style="color: #800000;"&gt;P_1&lt;/SPAN&gt; + &lt;SPAN style="color: #0000ff;"&gt;IterNo&lt;/SPAN&gt;()+1) &amp;lt;= &lt;SPAN style="color: #800000;"&gt;PERIODO&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/164069_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Antonio&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 May 2017 15:27:52 GMT</pubDate>
    <dc:creator>antoniotiman</dc:creator>
    <dc:date>2017-05-19T15:27:52Z</dc:date>
    <item>
      <title>Get all possible periods, repeating values.</title>
      <link>https://community.qlik.com/t5/QlikView/Get-all-possible-periods-repeating-values/m-p/1300137#M515317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning folks,&lt;/P&gt;&lt;P&gt;I have a situation here that I'm not getting any soluction by my own...&lt;/P&gt;&lt;P&gt;I have 3 main fields to do this:&lt;/P&gt;&lt;P&gt;the product ID "CD_PRODUTO" to identify it&lt;/P&gt;&lt;P&gt;the periods reference "PERIODO" formated like 'YYYYMM' that tell when some product was bought&lt;/P&gt;&lt;P&gt;and the cost "CUSTO" that tell how much each unit cost by that purchase.&lt;/P&gt;&lt;P&gt;The problems is that the most part of the products aren't purchased every month. I need to show every product, period and price, even if it hasn't been purchased by this period, and by reapeating the price of the last bought.&lt;/P&gt;&lt;P&gt;There are a picture of the data table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2017 12:22:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-all-possible-periods-repeating-values/m-p/1300137#M515317</guid>
      <dc:creator />
      <dc:date>2017-05-19T12:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Get all periods between to dates, repeating values.</title>
      <link>https://community.qlik.com/t5/QlikView/Get-all-possible-periods-repeating-values/m-p/1300138#M515318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To fill in the missing dates you'll have to create a MasterCalendar on which you should join your sales figures.&lt;/P&gt;&lt;P&gt;You will have Null values for the dates where you did not sell a certain product. You can use the Peek and Previous functions to populate these fields with Null values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/48693"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3048"&gt;Peek() vs Previous() – When to Use Each&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2017 12:36:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-all-possible-periods-repeating-values/m-p/1300138#M515318</guid>
      <dc:creator />
      <dc:date>2017-05-19T12:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get all possible periods, repeating values.</title>
      <link>https://community.qlik.com/t5/QlikView/Get-all-possible-periods-repeating-values/m-p/1300139#M515319</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;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Temp:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; *,&lt;SPAN style="color: #0000ff;"&gt;Previous&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;PERIODO&lt;/SPAN&gt;) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;P_1&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;Previous&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;CUSTO&lt;/SPAN&gt;) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;C_1&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Inline&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[&lt;BR /&gt; CD_PRODUTO,PERIODO,CUSTO&lt;BR /&gt; 1,201601,15&lt;BR /&gt; 1,201606,16&lt;BR /&gt; 1,201609,18&lt;BR /&gt; 2,201604,25&lt;BR /&gt; 2,201606,26&lt;BR /&gt; 2,201610,28&lt;BR /&gt; ]&lt;/SPAN&gt;;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Concatenate&lt;/SPAN&gt;&lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="color: #800000;"&gt;CD_PRODUTO&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;P_1&lt;/SPAN&gt; + &lt;SPAN style="color: #0000ff;"&gt;IterNo&lt;/SPAN&gt;() &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;PERIODO&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;C_1&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;CUSTO&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="color: #008000;"&gt;//Date(MonthStart(Date#(P_1,'YYYYMM'),IterNo()-1),'YYYYMM') as PERIODO1 //if You need PERIODO as Date Field&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Resident&lt;/SPAN&gt; Temp&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;While&lt;/SPAN&gt;&amp;nbsp; (&lt;SPAN style="color: #800000;"&gt;P_1&lt;/SPAN&gt; + &lt;SPAN style="color: #0000ff;"&gt;IterNo&lt;/SPAN&gt;()+1) &amp;lt;= &lt;SPAN style="color: #800000;"&gt;PERIODO&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/164069_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Antonio&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2017 15:27:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-all-possible-periods-repeating-values/m-p/1300139#M515319</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-05-19T15:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get all possible periods, repeating values.</title>
      <link>https://community.qlik.com/t5/QlikView/Get-all-possible-periods-repeating-values/m-p/1300140#M515320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Looks like you saved the day, my friend.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;Just for knowledge. I only used two loops following your example. The first one was like yours, to load new lines for each blank period until the next one arrives, and another, to load new lines with the last period of purchase until today, in case of no purchases in the last month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Really thankful&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 12:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-all-possible-periods-repeating-values/m-p/1300140#M515320</guid>
      <dc:creator />
      <dc:date>2017-05-25T12:27:55Z</dc:date>
    </item>
  </channel>
</rss>

