<?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: Load Distinct problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508435#M600435</link>
    <description>Second script is not equal to first script. How you are comparing both scripts. DISTINCT Keyword removes only Unique rows. But, Qlik will automate that function.&lt;BR /&gt;MinString can help to show only one row as always based on aggregate to Emploee_ID and Parent.</description>
    <pubDate>Sat, 17 Nov 2018 06:17:07 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2018-11-17T06:17:07Z</dc:date>
    <item>
      <title>Load Distinct problem</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508386#M600433</link>
      <description>&lt;P&gt;I have an app with multiple fact tables which i am trying to optimize. For that purpose trying to create a link table (have not included that part)&lt;/P&gt;&lt;P&gt;For doing this i am doing a&amp;nbsp;load distnct&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;load&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp;Distinct&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp;Employee_ID,&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp;Parent,&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;FactType&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;resident&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;MasterData&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;where FactType='xyz';&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Master table&amp;nbsp;has approx 120 million records.&amp;nbsp;&lt;/P&gt;&lt;P&gt;the result of a&amp;nbsp;expression count(distinct Employee_ID&amp;amp;Parent) is around 400k records&amp;nbsp;&lt;/P&gt;&lt;P&gt;But somehow the &lt;STRONG&gt;load distinct doesnt work.&amp;nbsp;&lt;/STRONG&gt;the above load results in 120 million records&lt;/P&gt;&lt;P&gt;its weird. i remember reading somewhere about this but couldnt find the article again&lt;/P&gt;&lt;P&gt;but basically i replace above script with&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;Distinct&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;Employee_ID,&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;Parent,&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;MinString(FactType)&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;resident&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;MasterData&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;where FactType='xyz'&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;group by Employee_ID , Parent;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this one worked perfectly.&lt;/P&gt;&lt;P&gt;Can someone&amp;nbsp;explain theory behind this?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6148"&gt;@rwunderlich&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6152"&gt;@Oleg_Troyansky&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 21:17:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508386#M600433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-16T21:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Load Distinct problem</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508418#M600434</link>
      <description>&lt;P&gt;Are you doing a preceding load before this? If so, the distinct needs to be on the top load and any distinct in the following loads are ignored.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Nov 2018 05:35:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508418#M600434</guid>
      <dc:creator>mikevwang</dc:creator>
      <dc:date>2018-11-17T05:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Load Distinct problem</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508435#M600435</link>
      <description>Second script is not equal to first script. How you are comparing both scripts. DISTINCT Keyword removes only Unique rows. But, Qlik will automate that function.&lt;BR /&gt;MinString can help to show only one row as always based on aggregate to Emploee_ID and Parent.</description>
      <pubDate>Sat, 17 Nov 2018 06:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508435#M600435</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-11-17T06:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Load Distinct problem</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508448#M600436</link>
      <description>No I am not doing a preceding load</description>
      <pubDate>Sat, 17 Nov 2018 06:36:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508448#M600436</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-17T06:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Load Distinct problem</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508451#M600437</link>
      <description>I understand it's not technically equivalent. But Look at the where clause. The value on facttype column is just 'xyz'.&lt;BR /&gt;Still in the first load it doesn't give unique values. I tried distict on just Employee_ID and Parent with the where clause still doesn't work</description>
      <pubDate>Sat, 17 Nov 2018 06:38:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508451#M600437</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-17T06:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Load Distinct problem</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508453#M600438</link>
      <description>&lt;P&gt;Can you try this?&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;STRONG&gt;Sum(Aggr(count(distinct Employee_ID&amp;amp;Parent), Empolyee_ID, Parent))&lt;/STRONG&gt;&lt;/LI-SPOILER&gt;</description>
      <pubDate>Sat, 17 Nov 2018 06:37:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508453#M600438</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-11-17T06:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Load Distinct problem</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508456#M600439</link>
      <description>&lt;P&gt;Why do you think it doesn't do a distinct load? How are you checking that?&lt;BR /&gt;Try explicitly creating a new table so the data won't accidentally be appended to an existing table and store that table in a qvd so you can check outside of your qlikview document.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;TempLink:
NOCONCATENATE
Load Distinct
    Employee_ID,
    Parent,
    FactType
resident
    MasterData
where 
    FactType='xyz';

STORE TempLink INTO [C:\CheckMe\CheckMe.qvd] (qvd);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Nov 2018 06:54:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508456#M600439</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2018-11-17T06:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Load Distinct problem</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508486#M600440</link>
      <description>Hi&lt;BR /&gt;Value for count(distinct Employee_ID&amp;amp;Parent)&lt;BR /&gt;with facttype filtered is around 400k.&lt;BR /&gt;The result of first load is the full 100 million rows.&lt;BR /&gt;&lt;BR /&gt;Yes. I loaded the data in a separate qvw. Same result.&lt;BR /&gt;In fact found the work around with minstring in the separate qvw. I vaguely recall an article mentioning distinct doesn't always mean unique and to use aggregation to make it work. Not sure where I read it</description>
      <pubDate>Sat, 17 Nov 2018 11:15:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508486#M600440</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-17T11:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Load Distinct problem</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508488#M600441</link>
      <description>Ok, count(distinct Employee_ID&amp;amp;Parent) should always return the distinct number of combinations. But only if you really specify the distinct keyword in the expression. You're using that expression in a chart or text object, right?&lt;BR /&gt;&lt;BR /&gt;Does it happen with a smaller data set too? Could you try to create a small qlikview document that reproduces the problem?</description>
      <pubDate>Sat, 17 Nov 2018 11:33:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508488#M600441</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2018-11-17T11:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Load Distinct problem</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508489#M600442</link>
      <description>Yes. I am using it as a chart.&lt;BR /&gt;&lt;BR /&gt;Will try and recreate on a smaller data set with hashed values. Not sure I can over the weekend the though</description>
      <pubDate>Sat, 17 Nov 2018 11:36:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508489#M600442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-17T11:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Load Distinct problem</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508502#M600443</link>
      <description>Got the answer some errant data in one of the fields were causing the issue. truncating the field solved the issue.&lt;BR /&gt;Knew it must have been something simple&lt;BR /&gt;thanks for the assistance</description>
      <pubDate>Sat, 17 Nov 2018 13:36:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Distinct-problem/m-p/1508502#M600443</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-17T13:36:41Z</dc:date>
    </item>
  </channel>
</rss>

