<?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: values differ from qlikview to database query result in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/values-differ-from-qlikview-to-database-query-result/m-p/427739#M491131</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what result would you expect &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is your requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use distinct if you are getting more than expected value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Count(&lt;STRONG&gt;distinct &lt;/STRONG&gt;if(PartnerJoinDate&amp;gt;=Week_Start_Date__c and PartnerJoinDate&amp;lt;=Week_End_Date__c,Partner_Id__c)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;hope this helps&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Sep 2012 04:23:26 GMT</pubDate>
    <dc:creator>SunilChauhan</dc:creator>
    <dc:date>2012-09-21T04:23:26Z</dc:date>
    <item>
      <title>values differ from qlikview to database query result</title>
      <link>https://community.qlik.com/t5/QlikView/values-differ-from-qlikview-to-database-query-result/m-p/427738#M491130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are trying get the Count(partner) based on the condition Joinedpartner&amp;gt;Weekenddate..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using the below condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count(if(PartnerJoinDate&amp;gt;=Week_Start_Date__c and PartnerJoinDate&amp;lt;=Week_End_Date__c,Partner_Id__c)) but the values differ from the database query result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are thevalues from database query:&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 95px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" width="95"&gt;Count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;64&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;127&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;146&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;203&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;286&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;502&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;608&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;690&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;734&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;770&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;823&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;839&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="20" style="border-top: none;"&gt;905&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;below are thevalue from qlikview:&lt;/P&gt;&lt;P&gt;&lt;IMG class="jiveImage" src="https://community.qlik.com/" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 19:02:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/values-differ-from-qlikview-to-database-query-result/m-p/427738#M491130</guid>
      <dc:creator />
      <dc:date>2012-09-20T19:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: values differ from qlikview to database query result</title>
      <link>https://community.qlik.com/t5/QlikView/values-differ-from-qlikview-to-database-query-result/m-p/427739#M491131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what result would you expect &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is your requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use distinct if you are getting more than expected value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Count(&lt;STRONG&gt;distinct &lt;/STRONG&gt;if(PartnerJoinDate&amp;gt;=Week_Start_Date__c and PartnerJoinDate&amp;lt;=Week_End_Date__c,Partner_Id__c)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;hope this helps&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 04:23:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/values-differ-from-qlikview-to-database-query-result/m-p/427739#M491131</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2012-09-21T04:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: values differ from qlikview to database query result</title>
      <link>https://community.qlik.com/t5/QlikView/values-differ-from-qlikview-to-database-query-result/m-p/427740#M491132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ThankYou Sunil for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sorry that I haven't explained the issue clearly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will Explain it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically there are 4 tables Week,partner,sales,quarter&lt;/P&gt;&lt;P&gt;sales and partner are related, &lt;/P&gt;&lt;P&gt;sales and quarter are related,&lt;/P&gt;&lt;P&gt;Quarter and Week are related,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below table is the result from our database for the query &lt;/P&gt;&lt;P&gt;'select count(Id) from partner_c where createddate&amp;gt;=2012-03-31T00:00:00Z and&amp;nbsp; createddate&amp;lt;=2012-04-06T00:00:00Z"&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the query the date&amp;nbsp; 2012-03-31T00:00:00Z is weekstart date and&amp;nbsp; 2012-04-06T00:00:00Z is Weekenddate.&lt;/P&gt;&lt;P&gt;We manually changed the date during the query, bcoz there is no direct relationship btw partner and Week tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 332px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" width="87"&gt;Quarter&lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;" width="71"&gt;Week&lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;" width="73"&gt;End Date&lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;" width="101"&gt;Count &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl73" height="20"&gt;2012-Q4&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 1&lt;/TD&gt;&lt;TD class="xl72" style="border-top: none; border-left: none;"&gt;2012-04-06&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none;"&gt;480&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;3/31/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 2&lt;/TD&gt;&lt;TD class="xl72" style="border-top: none; border-left: none;"&gt;2012-04-13&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none;"&gt;951&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;6/29/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 3&lt;/TD&gt;&lt;TD class="xl72" style="border-top: none; border-left: none;"&gt;2012-04-20&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none;"&gt;1708&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 4&lt;/TD&gt;&lt;TD class="xl72" style="border-top: none; border-left: none;"&gt;2012-04-27&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none;"&gt;1708&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 5&lt;/TD&gt;&lt;TD class="xl74"&gt;2012-05-04&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none;"&gt;2389&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 6&lt;/TD&gt;&lt;TD class="xl74"&gt;2012-05-11&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none;"&gt;2715&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 7&lt;/TD&gt;&lt;TD class="xl74"&gt;2012-05-18&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none;"&gt;3427&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 8&lt;/TD&gt;&lt;TD class="xl74"&gt;2012-05-25&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none;"&gt;3953&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 9&lt;/TD&gt;&lt;TD class="xl74"&gt;2012-06-01&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none;"&gt;4065&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 10&lt;/TD&gt;&lt;TD class="xl74"&gt;2012-06-08&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none;"&gt;4407&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 11&lt;/TD&gt;&lt;TD class="xl74"&gt;2012-06-15&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none;"&gt;5073&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 12&lt;/TD&gt;&lt;TD class="xl74"&gt;2012-06-22&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none;"&gt;5073&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none;"&gt;Week 13&lt;/TD&gt;&lt;TD class="xl74"&gt;2012-06-29&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none;"&gt;5444&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Coming to the Qlikview,&lt;/P&gt;&lt;P&gt;In the script level, I loaded Sales,partner,quarterand week tables.&lt;/P&gt;&lt;P&gt;I have taken Week as dimension and&amp;nbsp; the expression for partner is "Count (If(PartnerCreateddate&amp;gt;=Week_Start_Date__c and PartnerCreateddate&amp;lt;=Week_End_Date__c,Partner_Id__c))"&lt;/P&gt;&lt;P&gt;and I am getting the below results:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="294"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="98"&gt;2012-Q4&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="98"&gt;WEEK 01&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: none;" width="98"&gt;65&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" style="border-top: none;"&gt;2012-Q4&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;WEEK 02&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;102&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" style="border-top: none;"&gt;2012-Q4&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;WEEK 03&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;62&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" style="border-top: none;"&gt;2012-Q4&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;WEEK 05&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;123&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" style="border-top: none;"&gt;2012-Q4&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;WEEK 06&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" style="border-top: none;"&gt;2012-Q4&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;WEEK 07&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;216&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" style="border-top: none;"&gt;2012-Q4&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;WEEK 08&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" style="border-top: none;"&gt;2012-Q4&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;WEEK 10&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" style="border-top: none;"&gt;2012-Q4&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;WEEK 11&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;177&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any solution to the above&amp;nbsp; issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Awaiting for your reply.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bharath Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 06:31:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/values-differ-from-qlikview-to-database-query-result/m-p/427740#M491132</guid>
      <dc:creator />
      <dc:date>2012-09-21T06:31:39Z</dc:date>
    </item>
  </channel>
</rss>

