<?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: Codes of   count  but the value is incorrect in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091872#M89499</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/199195"&gt;@Sxbbb&lt;/a&gt;&amp;nbsp;Could you please post the sample data please?&lt;/P&gt;
&lt;P&gt;Ideally count(distinct &lt;SPAN&gt;BoardNo_ORB&lt;/SPAN&gt;) should give you the right result.&lt;/P&gt;
&lt;P&gt;But let me look into your data.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jul 2023 02:58:26 GMT</pubDate>
    <dc:creator>sidhiq91</dc:creator>
    <dc:date>2023-07-10T02:58:26Z</dc:date>
    <item>
      <title>Codes of   count  but the value is incorrect</title>
      <link>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091868#M89498</link>
      <description>&lt;P&gt;I have Field&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sxbbb_0-1688955297145.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111853i176147DFAD6BEDCF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sxbbb_0-1688955297145.png" alt="Sxbbb_0-1688955297145.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I want to count BoardNo_ORB&amp;nbsp; But I tried the code :&amp;nbsp;Count(BoardNo_ORB)&amp;nbsp;&lt;FONT color="#FF0000"&gt;Invalid result&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sxbbb_1-1688955826468.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111854iAC6166D1F1D7847F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sxbbb_1-1688955826468.png" alt="Sxbbb_1-1688955826468.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;The correct result is 13.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sxbbb_2-1688956065716.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111855i793653D6B785DAE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sxbbb_2-1688956065716.png" alt="Sxbbb_2-1688956065716.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I want to count BoardNo_ORB&amp;nbsp; But I tried the code :&amp;nbsp;Count(BoardNo_ORB)&amp;nbsp;&lt;FONT color="#FF0000"&gt;Invalid result.&amp;nbsp;The correct result is 13.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:36:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091868#M89498</guid>
      <dc:creator>Sxbbb</dc:creator>
      <dc:date>2024-11-15T21:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Codes of   count  but the value is incorrect</title>
      <link>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091872#M89499</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/199195"&gt;@Sxbbb&lt;/a&gt;&amp;nbsp;Could you please post the sample data please?&lt;/P&gt;
&lt;P&gt;Ideally count(distinct &lt;SPAN&gt;BoardNo_ORB&lt;/SPAN&gt;) should give you the right result.&lt;/P&gt;
&lt;P&gt;But let me look into your data.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 02:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091872#M89499</guid>
      <dc:creator>sidhiq91</dc:creator>
      <dc:date>2023-07-10T02:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Codes of   count  but the value is incorrect</title>
      <link>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091875#M89500</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I want to count BoardNo_ORB&amp;nbsp; &lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;The correct result is 13.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sxbbb_0-1688958131798.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111857i2CB2F681692EF75C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sxbbb_0-1688958131798.png" alt="Sxbbb_0-1688958131798.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;But I tried the code :&amp;nbsp;Count(BoardNo_ORB) . Result is 65&amp;nbsp;&lt;FONT color="#FF6600"&gt;invalid value&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sxbbb_1-1688958339357.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111858iED65EE18C4140E5A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sxbbb_1-1688958339357.png" alt="Sxbbb_1-1688958339357.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;The correct result is 13.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 03:05:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091875#M89500</guid>
      <dc:creator>Sxbbb</dc:creator>
      <dc:date>2023-07-10T03:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Codes of   count  but the value is incorrect</title>
      <link>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091929#M89504</link>
      <description>&lt;P&gt;Each object within the UI displayed the distinct combination of field-values. It's not the base for a calculation else the result.&lt;/P&gt;
&lt;P&gt;In your case it means that you haven't a single value of BoardNo for a WorkOrder else there are 5 field-values. This is cause from either invalid data or wrong script- and/or data-model logic - probably by wrong designed joins/associations.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 07:18:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091929#M89504</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-07-10T07:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Codes of   count  but the value is incorrect</title>
      <link>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091951#M89506</link>
      <description>&lt;P&gt;How do I solve the problem?&lt;/P&gt;
&lt;P&gt;This is Edit Script&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sxbbb_0-1688974903620.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111875i448F8433A86B7DB3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sxbbb_0-1688974903620.png" alt="Sxbbb_0-1688974903620.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sxbbb_2-1688975025026.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111877i3C9BCAF0FF7C5A29/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sxbbb_2-1688975025026.png" alt="Sxbbb_2-1688975025026.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 07:43:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091951#M89506</guid>
      <dc:creator>Sxbbb</dc:creator>
      <dc:date>2023-07-10T07:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Codes of   count  but the value is incorrect</title>
      <link>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091955#M89507</link>
      <description>&lt;P&gt;I assume that the duplicates come directly from your load by overlapping of the file-content between those multiple files.&amp;nbsp;You may try to resolve such case with:&lt;/P&gt;
&lt;P&gt;load &lt;STRONG&gt;distinct&lt;/STRONG&gt; ...;&lt;/P&gt;
&lt;P&gt;Another approach would be to check for an unique key by loading the data. If none such key exists it might be create-able by combining several fields, for example with something like:&lt;/P&gt;
&lt;P&gt;load *, F1 &amp;amp; '|' &amp;amp; F2 as Key&lt;BR /&gt;from Source where not exists(Key, F1 &amp;amp; '|' &amp;amp; F2);&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 07:56:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091955#M89507</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-07-10T07:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Codes of   count  but the value is incorrect</title>
      <link>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091957#M89508</link>
      <description>&lt;P&gt;What if I want to load an Excel file with just the latest date? What can I do?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;But Excel files will be added every day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 07:58:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091957#M89508</guid>
      <dc:creator>Sxbbb</dc:creator>
      <dc:date>2023-07-10T07:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Codes of   count  but the value is incorrect</title>
      <link>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091969#M89510</link>
      <description>&lt;P&gt;You may directly grab the latest file with something like:&lt;/P&gt;
&lt;P&gt;let v = text(date(today()-1, 'YYYYMMDD'));&lt;/P&gt;
&lt;P&gt;load * from [YourPath\&lt;STRONG&gt;$(v)&lt;/STRONG&gt;_40_ORB.xlsx] (ooxml, ...);&lt;/P&gt;
&lt;P&gt;On top of such logic you will probably need some error-handling for the case the file didn't exists (too late or on general missing and/or weekends/holidays) - maybe with ERRORMODE.&lt;/P&gt;
&lt;P&gt;Better are mostly approaches with a filelist() loop which would run through entire folder and within another if-loop checked the filetime() or a file-name extract or the date-field within the load against the latest previous data which is stored within a variable. It would go in this direction:&lt;/P&gt;
&lt;P&gt;for each file in filelist('path\*.xlsx')&lt;BR /&gt;&amp;nbsp; &amp;nbsp;if filetime('path\*.xlsx') &amp;gt; '$(v)' then&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;load ... from [$(file)] (ooxml, ...);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let v =&amp;nbsp;filetime('$(file));&lt;BR /&gt;&amp;nbsp; &amp;nbsp;end if&lt;BR /&gt;next&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 08:22:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Codes-of-count-but-the-value-is-incorrect/m-p/2091969#M89510</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-07-10T08:22:38Z</dc:date>
    </item>
  </channel>
</rss>

