<?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: Formatting Data File Layouts with QV? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formatting-Data-File-Layouts-with-QV/m-p/81241#M604430</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad it worked for you.&lt;/P&gt;&lt;P&gt;I think sorting in the load order may be challenging but below small change in bold made things easy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;RecNo() as ID,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dual(if(len("H/D")=0,'D',"H/D"),RecNo()) as "H/D",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if(BOM_Material=Previous(BOM_Material),'',BOM_Material) as BOM_Material,&lt;/P&gt;&lt;P&gt;if(len(ItemCat)=0,'',ItemCat) as ItemCat,&lt;/P&gt;&lt;P&gt;if(len(Component)=0,'',Component) as Component,&lt;/P&gt;&lt;P&gt;if(len(Qty)=0,'',Qty) as Qty,&lt;/P&gt;&lt;P&gt;if(len(UoM)=0,'',UoM) as UoM&lt;/P&gt;&lt;P&gt;Resident Input&lt;/P&gt;&lt;P&gt;Order By BOM_Material,"H/D" DESC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is table box.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/200593_Capture.PNG" style="height: 705px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2018 02:32:49 GMT</pubDate>
    <dc:creator>Digvijay_Singh</dc:creator>
    <dc:date>2018-04-24T02:32:49Z</dc:date>
    <item>
      <title>Formatting Data File Layouts with QV?</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Data-File-Layouts-with-QV/m-p/81238#M604427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attempting to achieve a specified data format for a bill of material conversion file with many many bills. I thought that QV would be an excellent tool to get the load file formatted correctly since there are a lot of BOMs. Essentially, I am looking to take a file with the header and details in one place and break it out with a new column: H/D - 'H' for header and 'D' for detail. The data will appear in a "one off" style as shown in the "Desired Format" tab. I have attached an example excel sheet with what we want to achieve:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Use the data found in the "Data to be used" tab to load into QV&lt;/P&gt;&lt;P&gt;2. Use scripting to get the file in the format found in the "Desired Format" tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if anything is unclear and your help is greatly appreciated. I tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. loading table with distinct "header" details and concatenating line items with IF() logic to null values out where needed&lt;/P&gt;&lt;P&gt;2. Prev() function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 22:48:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Data-File-Layouts-with-QV/m-p/81238#M604427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-23T22:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Data File Layouts with QV?</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Data-File-Layouts-with-QV/m-p/81239#M604428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this&amp;nbsp; may be -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/200585_Capture.PNG" style="height: 393px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Input:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD BOM_Material, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ItemCat, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Component, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Qty, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UoM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;FROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;[..\..\..\..\..\..\Downloads\TEST_DATA.xlsx]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;(ooxml, embedded labels, table is [Data to be used]);&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;Concatenate(Input)&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; distinct&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; BOM_Material,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; 'H' as "H/D"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident Input;&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;NoConcatenate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Final:&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; RecNo() as ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; if(len("H/D")=0,'D',"H/D") as "H/D",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; if(BOM_Material=Previous(BOM_Material),'',BOM_Material) as BOM_Material,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; if(len(ItemCat)=0,'',ItemCat) as ItemCat,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; if(len(Component)=0,'',Component) as Component,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; if(len(Qty)=0,'',Qty) as Qty,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; if(len(UoM)=0,'',UoM) as UoM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident Input&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Order By BOM_Material,"H/D" DESC;&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 Input;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 00:16:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Data-File-Layouts-with-QV/m-p/81239#M604428</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2018-04-24T00:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Data File Layouts with QV?</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Data-File-Layouts-with-QV/m-p/81240#M604429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is exactly what we were trying to do. Our code looked similar up until the final load in your script. Thanks a ton. If I may ask one more question: the chart that you used is a straight table, is there any particular thing I need to look out for if we use a tablebox instead?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 00:52:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Data-File-Layouts-with-QV/m-p/81240#M604429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-24T00:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Data File Layouts with QV?</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Data-File-Layouts-with-QV/m-p/81241#M604430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad it worked for you.&lt;/P&gt;&lt;P&gt;I think sorting in the load order may be challenging but below small change in bold made things easy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;RecNo() as ID,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dual(if(len("H/D")=0,'D',"H/D"),RecNo()) as "H/D",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if(BOM_Material=Previous(BOM_Material),'',BOM_Material) as BOM_Material,&lt;/P&gt;&lt;P&gt;if(len(ItemCat)=0,'',ItemCat) as ItemCat,&lt;/P&gt;&lt;P&gt;if(len(Component)=0,'',Component) as Component,&lt;/P&gt;&lt;P&gt;if(len(Qty)=0,'',Qty) as Qty,&lt;/P&gt;&lt;P&gt;if(len(UoM)=0,'',UoM) as UoM&lt;/P&gt;&lt;P&gt;Resident Input&lt;/P&gt;&lt;P&gt;Order By BOM_Material,"H/D" DESC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is table box.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/200593_Capture.PNG" style="height: 705px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 02:32:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Data-File-Layouts-with-QV/m-p/81241#M604430</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2018-04-24T02:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Data File Layouts with QV?</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Data-File-Layouts-with-QV/m-p/81242#M604431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much again! This is an interesting use of Dual() to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 02:58:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Data-File-Layouts-with-QV/m-p/81242#M604431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-24T02:58:53Z</dc:date>
    </item>
  </channel>
</rss>

