<?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: How to repeat data in a dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1634585#M595161</link>
    <description>&lt;P&gt;Something like this assuming that the data resides in a single table (&lt;STRONG&gt;SourceTable&lt;/STRONG&gt;). Otherwise, replace with the corresponding query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Test:
NOCONCATENATE
LOAD *, If(Len(Trim(boxno)), boxno, Peek(boxno_temp)) AS boxno_temp
;
SELECT 
    Id, 
    boxno, 
    ModelCode, 
    ProductCode, 
    unit, 
    ProductId
FROM SourceTable
ORDER BY Id;

DROP FIELD boxno; RENAME FIELD boxno_temp TO boxno;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Oct 2019 01:05:10 GMT</pubDate>
    <dc:creator>JGMDataAnalysis</dc:creator>
    <dc:date>2019-10-14T01:05:10Z</dc:date>
    <item>
      <title>How to repeat data in a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1634567#M595160</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;I am working on a project.. My data sourse is MS-SQL..&lt;/P&gt;&lt;P&gt;I have a data like :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 718px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21353i3EBCC80919F0D1A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;I want to repeat&amp;nbsp; boxno to the null spaces&lt;/STRONG&gt;&lt;/FONT&gt; like that :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png" style="width: 698px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21354iC46373F903145D66/image-dimensions/698x511?v=v2" width="698" height="511" role="button" title="clipboard_image_0.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried lots of method in expression but i couldnt solve&lt;/P&gt;&lt;P&gt;like, isnull, Last , ... fonction..&lt;/P&gt;&lt;P&gt;Can you help me please&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Jules&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:14:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1634567#M595160</guid>
      <dc:creator>JulesVerne</dc:creator>
      <dc:date>2024-11-16T02:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to repeat data in a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1634585#M595161</link>
      <description>&lt;P&gt;Something like this assuming that the data resides in a single table (&lt;STRONG&gt;SourceTable&lt;/STRONG&gt;). Otherwise, replace with the corresponding query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Test:
NOCONCATENATE
LOAD *, If(Len(Trim(boxno)), boxno, Peek(boxno_temp)) AS boxno_temp
;
SELECT 
    Id, 
    boxno, 
    ModelCode, 
    ProductCode, 
    unit, 
    ProductId
FROM SourceTable
ORDER BY Id;

DROP FIELD boxno; RENAME FIELD boxno_temp TO boxno;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 01:05:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1634585#M595161</guid>
      <dc:creator>JGMDataAnalysis</dc:creator>
      <dc:date>2019-10-14T01:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to repeat data in a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1634594#M595162</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;I think your solution needs a little touch&lt;/P&gt;&lt;P&gt;It worked only one next-row after first 1 and first 2 and first 3 ...&lt;/P&gt;&lt;P&gt;Like :&lt;/P&gt;&lt;P&gt;In ID&amp;nbsp; 2119088 :&amp;nbsp; &lt;STRONG&gt;boxno = 1&lt;/STRONG&gt; --&amp;gt; That is good but boxno of&amp;nbsp; 2119089,2119090,2119091.... also must be "1"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png" style="width: 692px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21355iDFE35C08DE6F8A0C/image-dimensions/692x306?v=v2" width="692" height="306" role="button" title="clipboard_image_0.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Also others... boxno of 2119135 ID : --&amp;gt; is "2" comes from&amp;nbsp; up-ID&amp;nbsp; it is good...&lt;/P&gt;&lt;P&gt;But 2119136,2119137,2119138.... must be "2".....&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_1.png" style="width: 702px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21356i5F112E2D610EADD6/image-dimensions/702x279?v=v2" width="702" height="279" role="button" title="clipboard_image_1.png" alt="clipboard_image_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Oct 2019 20:22:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1634594#M595162</guid>
      <dc:creator>JulesVerne</dc:creator>
      <dc:date>2019-10-13T20:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to repeat data in a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1634609#M595163</link>
      <description>&lt;P&gt;There you go:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21358i96D83636C0759F4C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="clipboard_image_0.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Sort your data accordingly, I guess your data is sorted by ID btw.&lt;/P&gt;&lt;P&gt;Next, apply peek() function to grab the value above the record.&lt;/P&gt;&lt;P&gt;Refer qvw attached for reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Arthur Fong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 00:38:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1634609#M595163</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2019-10-14T00:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to repeat data in a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1634618#M595164</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I modified the original post,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I changed the field that receives the Peek function as an argument.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;If (Len (Trim (box)), box, Peek (&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;boxno_temp&lt;/STRONG&gt;&lt;/FONT&gt;)) AS boxno_temp&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 01:09:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1634618#M595164</guid>
      <dc:creator>JGMDataAnalysis</dc:creator>
      <dc:date>2019-10-14T01:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to repeat data in a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1635152#M595165</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/23225"&gt;@JGMDataAnalysis&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your answer is worked... Thanks... It was great job...&lt;/P&gt;&lt;P&gt;But there is a problem...&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Your script is working ONLY sequential ID...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When i inspect my IDs then they are not sequential..&lt;/P&gt;&lt;P&gt;So 2119186 is boxno=3 and there is no 2119187 ID .. It is jumping to 2119200 and I thinh the peek() fonction is set the boxno=1&lt;/P&gt;&lt;P&gt;I tried to add a new ID with :&lt;/P&gt;&lt;P&gt;LOAD *, &lt;STRONG&gt;RowNo() as QId&lt;/STRONG&gt;, If(Len(Trim(boxno)), boxno, Peek(boxno_temp)) AS boxno_temp&lt;/P&gt;&lt;P&gt;But the same jumping occurs here..&lt;/P&gt;&lt;P&gt;What should I do?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png" style="width: 787px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21481i74970CE1AE08A91C/image-dimensions/787x343?v=v2" width="787" height="343" role="button" title="clipboard_image_0.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 20:38:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1635152#M595165</guid>
      <dc:creator>JulesVerne</dc:creator>
      <dc:date>2019-10-14T20:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to repeat data in a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1635172#M595166</link>
      <description>&lt;P&gt;&lt;SPAN&gt;To determine my script I assumed that &lt;STRONG&gt;ONLY&lt;/STRONG&gt; the records that have been assigned the value &lt;STRONG&gt;1595&lt;/STRONG&gt; in the &lt;STRONG&gt;ProductID&lt;/STRONG&gt; field have a value in the &lt;STRONG&gt;boxno&lt;/STRONG&gt; field, according to the reference images. Also, to fill in the gaps, it's crucial to &lt;STRONG&gt;sort&lt;/STRONG&gt; the &lt;STRONG&gt;input table&lt;/STRONG&gt; by the &lt;STRONG&gt;Id&lt;/STRONG&gt; field in &lt;STRONG&gt;ascending&lt;/STRONG&gt; mode. To give you a solution that fits your requirements, I need to see your complete script and if it is possible for you, to attach a file with the data of the example images.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 21:51:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1635172#M595166</guid>
      <dc:creator>JGMDataAnalysis</dc:creator>
      <dc:date>2019-10-14T21:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to repeat data in a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1635371#M595167</link>
      <description>&lt;P&gt;In My SQL&lt;/P&gt;&lt;P&gt;same ID Jumping... It is Normal...&amp;nbsp; 2119186 to 2119200&amp;nbsp; (It is same with QlikView)&lt;/P&gt;&lt;P&gt;And The counted record is equal (264)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png" style="width: 797px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21530i12B7D76A19E8B921/image-dimensions/797x287?v=v2" width="797" height="287" role="button" title="clipboard_image_0.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AND&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My full script is ( honestly your code &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/23225"&gt;@JGMDataAnalysis&lt;/a&gt;&amp;nbsp;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;OLEDB CONNECT32 TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=xx;Data Source=yyy ;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=zzzz;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is .......);&lt;/P&gt;&lt;P&gt;Test:&lt;BR /&gt;NOCONCATENATE&lt;BR /&gt;LOAD *, If(Len(Trim(boxno)), boxno, Peek(boxno_temp)) AS boxno_temp&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT&lt;BR /&gt;Id,&lt;BR /&gt;OrderType,&lt;BR /&gt;OrderCode,&lt;BR /&gt;boxno,&lt;BR /&gt;ModelCode,&lt;BR /&gt;VariantCode,&lt;BR /&gt;PName,&lt;BR /&gt;ProductCode,&lt;BR /&gt;ProductName,&lt;BR /&gt;UnitGroup,&lt;BR /&gt;unit,&lt;BR /&gt;UnitPrice,&lt;BR /&gt;UnitTotalPrice,&lt;BR /&gt;Category,&lt;BR /&gt;UnitPackage,&lt;BR /&gt;ControlPrice,&lt;BR /&gt;ProductId&lt;BR /&gt;FROM KamelonMicro.dbo.CekiList&lt;BR /&gt;ORDER BY Id, OrderCode;&lt;/P&gt;&lt;P&gt;DROP FIELD boxno;&lt;BR /&gt;RENAME FIELD boxno_temp TO boxno;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think, I must use different ID (sequential ID / havent any ID GAP) while loading data.. And then Peek() fonction will work fine..&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 12:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-repeat-data-in-a-dimension/m-p/1635371#M595167</guid>
      <dc:creator>JulesVerne</dc:creator>
      <dc:date>2019-10-15T12:26:38Z</dc:date>
    </item>
  </channel>
</rss>

