<?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 Table vs chart different results in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Table-vs-chart-different-results/m-p/207378#M63161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this, it might be simpler and cleaner. The "WHILE load generates all the dates between admission date and Discharge date, for each VisitID - the same logic as your two joins, but perhaps cleaner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Visits:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; AdmitDate, VisitID, DischargeDate&lt;BR /&gt; 3/31/2011, V68, 3/31/2011&lt;BR /&gt; 3/30/2011, V45, 3/30/2011&lt;BR /&gt; 3/30/2011, V10, 3/31/2011&lt;BR /&gt; 3/29/2011, V24, 3/29/2011&lt;BR /&gt; 3/30/2011, V81, 3/31/2011&lt;BR /&gt; 3/28/2011, V92, 3/31/2011&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;DailyVisits:&lt;BR /&gt;&lt;BR /&gt;load&lt;BR /&gt; VisitID,&lt;BR /&gt; AdmitDate,&lt;BR /&gt; DischargeDate,&lt;BR /&gt; date(AdmitDate + IterNo() - 1) as Date&lt;BR /&gt;resident&lt;BR /&gt; Visits&lt;BR /&gt;while&lt;BR /&gt; AdmitDate + IterNo() - 1 &amp;lt;= DischargeDate&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;drop table Visits;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Apr 2011 14:38:17 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2011-04-10T14:38:17Z</dc:date>
    <item>
      <title>Table vs chart different results</title>
      <link>https://community.qlik.com/t5/QlikView/Table-vs-chart-different-results/m-p/207375#M63158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting different results on tables and charts if I call an access table. If I use inline data the table and chart are correct but as soon as I go back to the access table the chart is off. I have attached the qvw. I have each scenario on its own tab in the script editor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Apr 2011 02:55:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-vs-chart-different-results/m-p/207375#M63158</guid>
      <dc:creator>dhborchardt</dc:creator>
      <dc:date>2011-04-10T02:55:11Z</dc:date>
    </item>
    <item>
      <title>Table vs chart different results</title>
      <link>https://community.qlik.com/t5/QlikView/Table-vs-chart-different-results/m-p/207376#M63159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It only looks like you are getting different results, because the Table Object eliminates duplicates and only shows you distinct combination of fields, without counting rows. In the chart, however, all duplicated rows are counted.&lt;/P&gt;&lt;P&gt;You clearly have 39 rows in your Calendar table, and many duplications. The duplicate rows are caused by the INTERVALMATCH load.&lt;/P&gt;&lt;P&gt;In order to see the duplicates in the table, open Table Viewer (Ctrl-T), right click on the table and select "Preview". You will see raw data, and you'll be able to see all the duplicated values before any de-duplication.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Apr 2011 04:11:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-vs-chart-different-results/m-p/207376#M63159</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-04-10T04:11:14Z</dc:date>
    </item>
    <item>
      <title>Table vs chart different results</title>
      <link>https://community.qlik.com/t5/QlikView/Table-vs-chart-different-results/m-p/207377#M63160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;P&gt;Thanks for the reply. I was being thrown off by the inline example I was using. Both the table and Chart were the same. I moved the db data into an inline table and see that it is still off. In the end it is the table example that I need and the duplicates need to be eliminated. Can this be accomplished by changing the JOIN between the table?&lt;/P&gt;&lt;P&gt;Below is the data I have been using. I would like the result to come out to 15. I am trying to count each day a patient was in the hospital. As you can see the result for each patient is given. When these are added up they = 15.&lt;/P&gt;&lt;P&gt;AdmitDate, DischargeDate, VisitID&lt;BR /&gt; 3/30/2011, 3/31/2011, V67 =2&lt;BR /&gt; 3/31/2011, 3/31/2011, V68 =1&lt;BR /&gt; 3/30/2011, 3/30/2011, V45 =1&lt;BR /&gt; 3/30/2011, 3/31/2011, V10 =2&lt;BR /&gt; 3/29/2011, 3/29/2011, V24 =1&lt;BR /&gt; 3/30/2011, 3/31/2011, V81 =2&lt;BR /&gt; 3/28/2011, 3/31/2011, V92 =4&lt;BR /&gt; 3/30/2011, 3/31/2011, V37 =2&lt;/P&gt;&lt;P&gt;Total = 15&lt;/P&gt;&lt;P&gt;The chart should look like this&lt;/P&gt;&lt;P&gt;3/28/2011 =1&lt;BR /&gt;3/29/2011 =2&lt;BR /&gt;3/30/2011 =6&lt;BR /&gt;3/31/2011 =6&lt;/P&gt;&lt;P&gt;Total 15&lt;/P&gt;&lt;P&gt;Is IntervalMatch the best way to do this? I don't really understand what is going on with IntervalMatch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Apr 2011 14:05:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-vs-chart-different-results/m-p/207377#M63160</guid>
      <dc:creator>dhborchardt</dc:creator>
      <dc:date>2011-04-10T14:05:30Z</dc:date>
    </item>
    <item>
      <title>Table vs chart different results</title>
      <link>https://community.qlik.com/t5/QlikView/Table-vs-chart-different-results/m-p/207378#M63161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this, it might be simpler and cleaner. The "WHILE load generates all the dates between admission date and Discharge date, for each VisitID - the same logic as your two joins, but perhaps cleaner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Visits:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; AdmitDate, VisitID, DischargeDate&lt;BR /&gt; 3/31/2011, V68, 3/31/2011&lt;BR /&gt; 3/30/2011, V45, 3/30/2011&lt;BR /&gt; 3/30/2011, V10, 3/31/2011&lt;BR /&gt; 3/29/2011, V24, 3/29/2011&lt;BR /&gt; 3/30/2011, V81, 3/31/2011&lt;BR /&gt; 3/28/2011, V92, 3/31/2011&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;DailyVisits:&lt;BR /&gt;&lt;BR /&gt;load&lt;BR /&gt; VisitID,&lt;BR /&gt; AdmitDate,&lt;BR /&gt; DischargeDate,&lt;BR /&gt; date(AdmitDate + IterNo() - 1) as Date&lt;BR /&gt;resident&lt;BR /&gt; Visits&lt;BR /&gt;while&lt;BR /&gt; AdmitDate + IterNo() - 1 &amp;lt;= DischargeDate&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;drop table Visits;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Apr 2011 14:38:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-vs-chart-different-results/m-p/207378#M63161</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-04-10T14:38:17Z</dc:date>
    </item>
    <item>
      <title>Table vs chart different results</title>
      <link>https://community.qlik.com/t5/QlikView/Table-vs-chart-different-results/m-p/207379#M63162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, very clean and simple. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 01:14:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-vs-chart-different-results/m-p/207379#M63162</guid>
      <dc:creator>dhborchardt</dc:creator>
      <dc:date>2011-04-11T01:14:20Z</dc:date>
    </item>
  </channel>
</rss>

