<?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: Code not working in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Code-not-working/m-p/1808331#M65828</link>
    <description>&lt;P&gt;Not working...still getting the duplicates as earlier.&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 11:06:14 GMT</pubDate>
    <dc:creator>seraphis</dc:creator>
    <dc:date>2021-05-17T11:06:14Z</dc:date>
    <item>
      <title>Code not working</title>
      <link>https://community.qlik.com/t5/App-Development/Code-not-working/m-p/1808291#M65818</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have fields as stated below. When the AssetSerial is present only once, the AssetCountFlag is 0 but when it is present more than once the AssetCountFlag is 1. However, since the data is in ascending order of case open date, the first instance (the oldest case open data) should show 0 and then the repeating AssetSerial can show 1.&amp;nbsp; Please see the code that I have written to make the first instance 0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Case4:&lt;BR /&gt;Load *, if(Case_Flat_Case.Asset_Serial_Number &amp;lt;&amp;gt; Previous(Case_Flat_Case.Asset_Serial_Number),&lt;BR /&gt;&amp;nbsp;0, 1) as AssetCountFinalFlag (&lt;FONT color="#FF0000"&gt;new flag I am creating&lt;/FONT&gt;)&lt;BR /&gt;Resident Case1&lt;BR /&gt;Order By Case_Flat_Case.Asset_Serial_Number,Case_Flat_Case.Date_Time_Opened asc;&lt;/P&gt;&lt;P&gt;When this code runs I find that AssetSerials that are present even once are getting duplicated with AssetCountFinalFlag as 0 in the first row and 1 in the next row. Also, the first row of the AssetSerialNumbers (more than one present) is getting duplicated with 0 in the first row and 1 in the next rows. The next rows are all coming okay.&amp;nbsp; Can anyone tell me why this is happening and how I can rectify this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;AssetSerial&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AssetCountFlag&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Case Open Date(in asc order)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;ASD4567&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt; 1&amp;nbsp; should become 0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;ASD4567&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;BR /&gt;ASD4567&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;BR /&gt;ASD4567&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;BR /&gt;AWE7899&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;BR /&gt;AKL9000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;AZX3478&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;&amp;nbsp; &lt;FONT color="#FF6600"&gt;1 should become 0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;AZX3478&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 21:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Code-not-working/m-p/1808291#M65818</guid>
      <dc:creator>seraphis</dc:creator>
      <dc:date>2021-12-21T21:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Code not working</title>
      <link>https://community.qlik.com/t5/App-Development/Code-not-working/m-p/1808306#M65822</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/141264"&gt;@seraphis&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Try like below&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Load *, if(Case_Flat_Case.Asset_Serial_Number &amp;lt;&amp;gt; Previous(Case_Flat_Case.Asset_Serial_Number),&lt;/SPAN&gt;&lt;SPAN&gt;0, 1) as&amp;nbsp;AssetCountFlag&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Resident Case1 order&amp;nbsp; by Case_Flat_Case.Asset_Serial_Number, [Case Open Date] ;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 09:31:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Code-not-working/m-p/1808306#M65822</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2021-05-17T09:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Code not working</title>
      <link>https://community.qlik.com/t5/App-Development/Code-not-working/m-p/1808331#M65828</link>
      <description>&lt;P&gt;Not working...still getting the duplicates as earlier.&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 11:06:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Code-not-working/m-p/1808331#M65828</guid>
      <dc:creator>seraphis</dc:creator>
      <dc:date>2021-05-17T11:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Code not working</title>
      <link>https://community.qlik.com/t5/App-Development/Code-not-working/m-p/1808546#M65854</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/141264"&gt;@seraphis&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you send the sample data or sample Qv file?&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 04:14:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Code-not-working/m-p/1808546#M65854</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2021-05-18T04:14:13Z</dc:date>
    </item>
  </channel>
</rss>

