<?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: Show data based on 2 dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528582#M197561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The previous method I mentioned about date link will definitely resolve the performance issue created by your new expression as you will not have a resource intensive set expression to manipulate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Aug 2013 07:42:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-08-26T07:42:10Z</dc:date>
    <item>
      <title>Show data based on 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528578#M197557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using qlikview 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 dates in the report, Order date and Commitment Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have master calendar which is linked to Order date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So displaying data in pivot table based on Order date is not a problem and it is working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now i have to create another pivot table, where i have to show the data based on Commitment date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since my calendar is linked with order date, the data that it shows based on commitment date basis is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can anyone help me on this, as how to show data based on order date as well as commitment basis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 06:44:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528578#M197557</guid>
      <dc:creator />
      <dc:date>2013-08-26T06:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Show data based on 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528579#M197558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably you are taking master calendar date field in the pivot table as dimension. Try taking the commitment date field as dimension in the pivot table instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 06:55:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528579#M197558</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-08-26T06:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Show data based on 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528580#M197559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class="replyToName"&gt;tresesco,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;I have added order date in my pivot table and order date is linked with calendar.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;I tried another way also as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;i created master calendar which i did not link to actual data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;Then in the expressions i wrote&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;for order date basis,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;sum({&amp;lt; Order = {'&amp;gt;= $(=monthstart(min(calendarDate))) &amp;lt;= $(=monthend(min(calendarDate)))'} &amp;gt;} OrderQty)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;for commitment date basis,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;/SPAN&gt;&lt;SPAN class="replyToName"&gt;sum({&amp;lt; CommitmentDate= {'&amp;gt;= $(=monthstart(min(calendarDate))) &amp;lt;= $(=monthend(min(calendarDate)))'} &amp;gt;} OrderQty)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;This is working fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;But this has affected the performance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;If you can help me to solve this performance issue, this will also do.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 07:34:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528580#M197559</guid>
      <dc:creator />
      <dc:date>2013-08-26T07:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Show data based on 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528581#M197560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey dude,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would build a date link table, and in your set analysis call that datetype. There is a good post from Rob somewhere on this forum, will try and find it for you, but none the less this is the process you need to follow to use multiple date fields with same data model&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create new tab in script and call it Date Link or something you will recognise&lt;/P&gt;&lt;P&gt;2) Your first table script should look something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DateLink:&lt;/P&gt;&lt;P&gt;LOAD DISTINCT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OrderDate as CalendarDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Order' as DateType&lt;/P&gt;&lt;P&gt;RESIDENT OrderDateTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE (DateLink)&lt;/P&gt;&lt;P&gt;LOAD DISTINCT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CommitmentDate as CalendarDate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Commitment' as DateType&lt;/P&gt;&lt;P&gt;RESIDENT CommitmentTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see we are creating a table with a field that helps us identify which date belongs to which original field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Call you calendar last! Since in your master calendar script you are generating the dates in between your min and max, you must run it last. You will change the field you want to base the calendar on from ORDERDATE to CALENDARDATE or what ever you named the date field above in the concatenate statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) In your pivot table, you can now sort by expression. In your expression you could write something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;DateType={'Commitment'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you just want another pivot table with Commitment date only, then in your dimension expression write this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(DateType = 'Commitment',CalendarDate,)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure you check the box suppress nulls since you don't want your expression to evaluate the dates you excluded in the null return. Let me know if you come right mate and this is what you were looking for&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Byron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 07:40:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528581#M197560</guid>
      <dc:creator />
      <dc:date>2013-08-26T07:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Show data based on 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528582#M197561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The previous method I mentioned about date link will definitely resolve the performance issue created by your new expression as you will not have a resource intensive set expression to manipulate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 07:42:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528582#M197561</guid>
      <dc:creator />
      <dc:date>2013-08-26T07:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Show data based on 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528583#M197562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the link for Rob's answer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/273796#273796"&gt;http://community.qlik.com/message/273796#273796&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Byron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 07:48:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528583#M197562</guid>
      <dc:creator />
      <dc:date>2013-08-26T07:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Show data based on 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528584#M197563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Byron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the way you told.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First took data from database with fields as Order date and commtiment date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then created link table as follows:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;DateLink:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD DISTINCT&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OrderDate as CalendarDate,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Order' as DateType&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RESIDENT OrderDateTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;CONCATENATE (DateLink)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD DISTINCT&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CommitmentDate as CalendarDate&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Commitment' as DateType&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RESIDENT &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;OrderDateTable&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Next created the master calender with date field as CalendarDate.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Now when I write the expression as &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt; dateType = {'Order'} &amp;gt;} OrderQty)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I dont get the correct value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 11:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528584#M197563</guid>
      <dc:creator />
      <dc:date>2013-08-26T11:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Show data based on 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528585#M197564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mate,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well without seeing a sample of your data model, I can't really see what could be the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If OrderQty exists in the same fact table as the calendar date then the calculation should have worked correctly with the above expression you used. Check what dimension you have in your object. If it is date, try the if statement, even though in theory the set analysis should cater for the new link table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you upload a sample with what the expected output should be and lets have a look &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Byron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 14:22:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-data-based-on-2-dates/m-p/528585#M197564</guid>
      <dc:creator />
      <dc:date>2013-08-26T14:22:19Z</dc:date>
    </item>
  </channel>
</rss>

