<?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 How to create fake records without duplicates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-create-fake-records-without-duplicates/m-p/98546#M605338</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;I have a Users table with info by year-month. &lt;/P&gt;&lt;P&gt;The problem is that I need to have all the months for all the years, and a value of 0 for this records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Users:&lt;/P&gt;&lt;P&gt;LOAD * Inline[&lt;/P&gt;&lt;P&gt;Username, Year, Month, Value&lt;/P&gt;&lt;P&gt;UserA, 2017, 01, 150&lt;/P&gt;&lt;P&gt;UserA, 2017, 03, 130&lt;/P&gt;&lt;P&gt;UserA, 2017, 04, 120&lt;/P&gt;&lt;P&gt;UserB, 2017, 01, 100&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the previous table what I need is to have something like this:&lt;/P&gt;&lt;P&gt;UserA, 2017, 01, 150&lt;/P&gt;&lt;P&gt;UserA, 2017, 02, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 03, 130&lt;/P&gt;&lt;P&gt;UserA, 2017, 04, 120&lt;/P&gt;&lt;P&gt;UserA, 2017, 05, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 06, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 07, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 08, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 09, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 10, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 11, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 12, 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jul 2018 09:17:26 GMT</pubDate>
    <dc:creator>albert_ortiz90</dc:creator>
    <dc:date>2018-07-18T09:17:26Z</dc:date>
    <item>
      <title>How to create fake records without duplicates</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-fake-records-without-duplicates/m-p/98546#M605338</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;I have a Users table with info by year-month. &lt;/P&gt;&lt;P&gt;The problem is that I need to have all the months for all the years, and a value of 0 for this records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Users:&lt;/P&gt;&lt;P&gt;LOAD * Inline[&lt;/P&gt;&lt;P&gt;Username, Year, Month, Value&lt;/P&gt;&lt;P&gt;UserA, 2017, 01, 150&lt;/P&gt;&lt;P&gt;UserA, 2017, 03, 130&lt;/P&gt;&lt;P&gt;UserA, 2017, 04, 120&lt;/P&gt;&lt;P&gt;UserB, 2017, 01, 100&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the previous table what I need is to have something like this:&lt;/P&gt;&lt;P&gt;UserA, 2017, 01, 150&lt;/P&gt;&lt;P&gt;UserA, 2017, 02, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 03, 130&lt;/P&gt;&lt;P&gt;UserA, 2017, 04, 120&lt;/P&gt;&lt;P&gt;UserA, 2017, 05, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 06, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 07, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 08, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 09, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 10, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 11, 0&lt;/P&gt;&lt;P&gt;UserA, 2017, 12, 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2018 09:17:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-fake-records-without-duplicates/m-p/98546#M605338</guid>
      <dc:creator>albert_ortiz90</dc:creator>
      <dc:date>2018-07-18T09:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create fake records without duplicates</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-fake-records-without-duplicates/m-p/98547#M605339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And same for UserB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2018 09:18:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-fake-records-without-duplicates/m-p/98547#M605339</guid>
      <dc:creator>albert_ortiz90</dc:creator>
      <dc:date>2018-07-18T09:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create fake records without duplicates</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-fake-records-without-duplicates/m-p/98548#M605340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;for each vUser in fieldvaluelist('Username')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp: load '$(vUser)' as Username, 2017 as Year, num(recno(), '00') as Month autogenerate 12;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;join(Users) load * resident temp; &lt;/SPAN&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;drop tables temp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;load Username, Year, Month, alt(Value, 0) as Value resident Users;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2018 11:57:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-fake-records-without-duplicates/m-p/98548#M605340</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-07-19T11:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to create fake records without duplicates</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-fake-records-without-duplicates/m-p/98549#M605341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solve the problem by this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UserInfoStd --&amp;gt; User info table with values at month-year level&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Mix_Min:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Load Date(Max(UserDate),'DD-MM-YYYY') as MaxDate,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; Date(Min(UserDate),'DD-MM-YYYY') as MinDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident UserInfoStd_aux;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let vMax = Num(Date(Peek('MaxDate')));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let vMin = Num(Date(Peek('MinDate')));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let vMin_1 = (Date(Peek('MinDate')));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Drop Table Mix_Min;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Master:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Load Distinct Date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Load MonthStart(Date(($(vMin)-1)+Recno())) as Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Autogenerate($(vMax)-$(vMin))+1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Join &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Load Distinct &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; UserInfoStd_User &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident UserInfoStd_aux;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Join(UserInfoStd_aux)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Load &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; UserInfoStd_User,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; Date as UserDate,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; Num(Month(Date)) as UserInfoStd_Date.Month,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; Year(Date) as UserInfoStd_Date.Year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident Master;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Drop Table Master;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 06:08:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-fake-records-without-duplicates/m-p/98549#M605341</guid>
      <dc:creator>albert_ortiz90</dc:creator>
      <dc:date>2018-07-20T06:08:02Z</dc:date>
    </item>
  </channel>
</rss>

