<?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: create new dummy records using script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752572#M719503</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/105825"&gt;@sadiaasghar&lt;/a&gt;&amp;nbsp; you can try cross join of Date &amp;amp; Product like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;DailySalesVolume:
LOAD distinct Date(ows_Date,'DD/MM/YYYY') as AppDate
FROM [http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;XMLDATA=0&amp;amp;RowLimit=0&amp;amp;List={83908779%2D467e%2D41a3%2Dbe3b%2Dfa23cb0f90ef}&amp;amp;View={47ED70E2-0F10-45C5-A294-1BE1866C1E52}] (XmlSimple, Table is [xml/data/row])
where Company='ABC';

join
LOAD distinct if(ows_Product='MS','PMG',if(ows_Product='KERO','SKO',if(ows_Product='JP-1','JET-A1',if(ows_Product='FO','F. Oil',ows_Product)))) as PRODUCT
FROM [http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;XMLDATA=0&amp;amp;RowLimit=0&amp;amp;List={83908779%2D467e%2D41a3%2Dbe3b%2Dfa23cb0f90ef}&amp;amp;View={47ED70E2-0F10-45C5-A294-1BE1866C1E52}] (XmlSimple, Table is [xml/data/row])
where Company='ABC';&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Oct 2020 23:18:04 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2020-10-14T23:18:04Z</dc:date>
    <item>
      <title>create new dummy records using script</title>
      <link>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752325#M719500</link>
      <description>&lt;P&gt;I fetch daily sales data in SharePoint DATA source and I want to fetch data for a particular company ABC from SAP. So for that purpose I want to create dummy records for each date and Product for Company ABC in my DailySalesVolume table. like I have 2 distinct dates and 8 distinct products in data source so I want to dynamically create 16 records for Company ABC using loop. How can I achieve this in qlikview.&lt;/P&gt;&lt;P&gt;DailySalesVolume:&lt;BR /&gt;LOAD ows_LinkTitle as Company,&lt;BR /&gt;if(ows_Product='MS','PMG',if(ows_Product='KERO','SKO',if(ows_Product='JP-1','JET-A1',if(ows_Product='FO','F. Oil',ows_Product)))) as PRODUCT,&lt;BR /&gt;Date(ows_Date,'DD/MM/YYYY') as AppDate,&lt;BR /&gt;Month(ows_Date) as AppMonth,&lt;BR /&gt;Year(ows_Date) as AppYear,&lt;BR /&gt;num(Month(ows_Date)) as MonthNo,&lt;BR /&gt;//Date(yearstart(ows_Date,0,7),'YYYY') as FY,&lt;BR /&gt;if(ows_Volume=' ' or ows_Volume='0' or ows_Volume= '-' ,0,ows_Volume) as AppVolume,&lt;BR /&gt;%Key_xml_98C49F546A18E856 // Key to parent table: xml&lt;BR /&gt;FROM [http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;XMLDATA=0&amp;amp;RowLimit=0&amp;amp;List={83908779%2D467e%2D41a3%2Dbe3b%2Dfa23cb0f90ef}&amp;amp;View={47ED70E2-0F10-45C5-A294-1BE1866C1E52}] (XmlSimple, Table is [xml/data/row]);&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752325#M719500</guid>
      <dc:creator>sadiaasghar</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: create new dummy records using script</title>
      <link>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752373#M719501</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/49432"&gt;@Chanty4u&lt;/a&gt;&amp;nbsp;Please have a look.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 12:03:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752373#M719501</guid>
      <dc:creator>sadiaasghar</dc:creator>
      <dc:date>2020-10-14T12:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: create new dummy records using script</title>
      <link>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752560#M719502</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp; Please help me with this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 19:23:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752560#M719502</guid>
      <dc:creator>sadiaasghar</dc:creator>
      <dc:date>2020-10-14T19:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: create new dummy records using script</title>
      <link>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752572#M719503</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/105825"&gt;@sadiaasghar&lt;/a&gt;&amp;nbsp; you can try cross join of Date &amp;amp; Product like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;DailySalesVolume:
LOAD distinct Date(ows_Date,'DD/MM/YYYY') as AppDate
FROM [http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;XMLDATA=0&amp;amp;RowLimit=0&amp;amp;List={83908779%2D467e%2D41a3%2Dbe3b%2Dfa23cb0f90ef}&amp;amp;View={47ED70E2-0F10-45C5-A294-1BE1866C1E52}] (XmlSimple, Table is [xml/data/row])
where Company='ABC';

join
LOAD distinct if(ows_Product='MS','PMG',if(ows_Product='KERO','SKO',if(ows_Product='JP-1','JET-A1',if(ows_Product='FO','F. Oil',ows_Product)))) as PRODUCT
FROM [http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;XMLDATA=0&amp;amp;RowLimit=0&amp;amp;List={83908779%2D467e%2D41a3%2Dbe3b%2Dfa23cb0f90ef}&amp;amp;View={47ED70E2-0F10-45C5-A294-1BE1866C1E52}] (XmlSimple, Table is [xml/data/row])
where Company='ABC';&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 23:18:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752572#M719503</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-10-14T23:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: create new dummy records using script</title>
      <link>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752617#M719504</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;Company ABC is not present in my intranet data. I want to insert Company ABC dummy data for each date and product. I have two distinct dates and 8 distinct product. As per my logic 2 loops will be created outer loop for dates and inner loop for product where&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to load&amp;nbsp;&lt;/P&gt;&lt;P&gt;'ABC' as Company,&lt;/P&gt;&lt;P&gt;'0' as Volume,&lt;/P&gt;&lt;P&gt;All the products as product,&lt;/P&gt;&lt;P&gt;Date as AppDate&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;Please suggest a/c to this logic&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 03:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752617#M719504</guid>
      <dc:creator>sadiaasghar</dc:creator>
      <dc:date>2020-10-15T03:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: create new dummy records using script</title>
      <link>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752621#M719505</link>
      <description>&lt;P&gt;I am attaching excel sheet for reference&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 03:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752621#M719505</guid>
      <dc:creator>sadiaasghar</dc:creator>
      <dc:date>2020-10-15T03:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: create new dummy records using script</title>
      <link>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752723#M719506</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/105825"&gt;@sadiaasghar&lt;/a&gt;&amp;nbsp; try below&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Data:
LOAD Distinct AppDate, 
     'ABC' as Company
FROM
[salesdata.xls]
(biff, embedded labels, table is Sheet1$);

join(Data)
LOAD Distinct
     0 as AppVolume,
     PRODUCT
FROM
[salesdata.xls]
(biff, embedded labels, table is Sheet1$);&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 15 Oct 2020 09:34:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752723#M719506</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-10-15T09:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: create new dummy records using script</title>
      <link>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752728#M719507</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If I understand your question. You have 2 date and 8 distinct product&amp;nbsp; and you want to create dummy records of 16 from the dates and products for ABC company.&lt;/P&gt;&lt;P&gt;Then I think you have to do below&lt;/P&gt;&lt;P&gt;tmpDate_Prod:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; DISTINCT AppDate FROM .......;&lt;/P&gt;&lt;P&gt;JOIN (tmpDate_Prod)&lt;/P&gt;&lt;P&gt;LOAD DISTINCT App_ProductFieldName FROM .......;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above will give you your desired result&lt;/P&gt;&lt;P&gt;Let me know if you need help&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 09:48:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1752728#M719507</guid>
      <dc:creator>Gabriel</dc:creator>
      <dc:date>2020-10-15T09:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: create new dummy records using script</title>
      <link>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1754035#M719509</link>
      <description>&lt;P&gt;thank you all Cross Join works in my case.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 10:28:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-new-dummy-records-using-script/m-p/1754035#M719509</guid>
      <dc:creator>sadiaasghar</dc:creator>
      <dc:date>2020-10-20T10:28:04Z</dc:date>
    </item>
  </channel>
</rss>

