<?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 How do I anchor dates? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461053#M1156095</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am new to QlikView and have a question on dates.&amp;nbsp; I see where I can build a master calendar, but what if I want to lookup data on a random date?&amp;nbsp; I do not think a master calendar is my solution, mostly due to the nature of my metric.&amp;nbsp; Below is an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Order Date.&amp;nbsp; &lt;/P&gt;&lt;P&gt;I have Ship Date.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Then I have what would be calendar dates where I want to randomly measure service level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic service level is calculated as Ship Date - Order Date i.e. # of days from Order to Shipment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But on a given day, I want to find Service level measure as defined below: &lt;/P&gt;&lt;P&gt;Here is where it gets a bit more complex.&amp;nbsp; The numerator is # Shipped on a given date of only those Ordered on that given date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The denominator is the Total number of shipments on given date (this includes shipments from orders of past days). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My overall calculation is: (#Shipped today from only those Ordered today)/(Total # shipped today) where today is the given date.&amp;nbsp; But I cannot use today() function.&amp;nbsp; It has to be able to find any date in the past, preferrably from my list boxes of Ship Date, Order Date, or any other dates I have. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e. (#Shipped on Jan1 from only Orders on Jan1)/(Total shipped on Jan 1).&amp;nbsp; But not using Jan 1 in the formulas.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dispatch# which is attached to each shipment.&amp;nbsp; So for the numerator, I am calculating Count(Distinct If(shipdate-orderdate=0, dispatch#, null())).&lt;/P&gt;&lt;P&gt;But the denominator is giving me problems.&amp;nbsp; I cannot just say count(distinct if(shipdate='value', dispatch#, null())).&lt;/P&gt;&lt;P&gt;My 'value' has to be an anchored formula so that whatever day I click on my list boxes for Shipdate, orderdate, etc. this is the 'value' always searched in the denominator. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sense?&amp;nbsp; Any help is greatly appreciated.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Feb 2013 21:31:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-21T21:31:06Z</dc:date>
    <item>
      <title>How do I anchor dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461053#M1156095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am new to QlikView and have a question on dates.&amp;nbsp; I see where I can build a master calendar, but what if I want to lookup data on a random date?&amp;nbsp; I do not think a master calendar is my solution, mostly due to the nature of my metric.&amp;nbsp; Below is an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Order Date.&amp;nbsp; &lt;/P&gt;&lt;P&gt;I have Ship Date.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Then I have what would be calendar dates where I want to randomly measure service level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic service level is calculated as Ship Date - Order Date i.e. # of days from Order to Shipment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But on a given day, I want to find Service level measure as defined below: &lt;/P&gt;&lt;P&gt;Here is where it gets a bit more complex.&amp;nbsp; The numerator is # Shipped on a given date of only those Ordered on that given date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The denominator is the Total number of shipments on given date (this includes shipments from orders of past days). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My overall calculation is: (#Shipped today from only those Ordered today)/(Total # shipped today) where today is the given date.&amp;nbsp; But I cannot use today() function.&amp;nbsp; It has to be able to find any date in the past, preferrably from my list boxes of Ship Date, Order Date, or any other dates I have. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e. (#Shipped on Jan1 from only Orders on Jan1)/(Total shipped on Jan 1).&amp;nbsp; But not using Jan 1 in the formulas.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dispatch# which is attached to each shipment.&amp;nbsp; So for the numerator, I am calculating Count(Distinct If(shipdate-orderdate=0, dispatch#, null())).&lt;/P&gt;&lt;P&gt;But the denominator is giving me problems.&amp;nbsp; I cannot just say count(distinct if(shipdate='value', dispatch#, null())).&lt;/P&gt;&lt;P&gt;My 'value' has to be an anchored formula so that whatever day I click on my list boxes for Shipdate, orderdate, etc. this is the 'value' always searched in the denominator. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sense?&amp;nbsp; Any help is greatly appreciated.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 21:31:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461053#M1156095</guid>
      <dc:creator />
      <dc:date>2013-02-21T21:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I anchor dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461054#M1156096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From what you are describing it sounds like a variable would be your best bet. You could have a calendar object that uses the variable vSearchDate, for example, and then refer to that variable in your denominator set analysis. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 22:03:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461054#M1156096</guid>
      <dc:creator />
      <dc:date>2013-02-21T22:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I anchor dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461055#M1156097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have a sample file, I could probably show you what I mean better than I can explain it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 22:04:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461055#M1156097</guid>
      <dc:creator />
      <dc:date>2013-02-21T22:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I anchor dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461056#M1156098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rebecca, that would be great.&amp;nbsp; I think your suggestion of SearchDate might be a possible solution.&amp;nbsp; Silly question - how do I upload a qvw file into discussion?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 23:45:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461056#M1156098</guid>
      <dc:creator />
      <dc:date>2013-02-21T23:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I anchor dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461057#M1156099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rebecca, that would be great.&amp;nbsp; I think your suggestion of SearchDate might be a possible solution.&amp;nbsp; Silly question - how do I upload a qvw file into discussion?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 23:45:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461057#M1156099</guid>
      <dc:creator />
      <dc:date>2013-02-21T23:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I anchor dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461058#M1156100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rebecca, that would be great.&amp;nbsp; I think your SearchDate idea might be a possible solution.&amp;nbsp; Silly question - how do I attach a qvw file into discussion?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 23:46:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461058#M1156100</guid>
      <dc:creator />
      <dc:date>2013-02-21T23:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I anchor dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461059#M1156101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not a silly question. After you click Reply, click 'Use advanced editor' (top right above Reply box). It may ask you if you are sure you want to leave the page, so say yes. Then it will show an option to attach files below the Reply box.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 13:58:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461059#M1156101</guid>
      <dc:creator />
      <dc:date>2013-02-22T13:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I anchor dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461060#M1156102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample file.&amp;nbsp; In the expression for the chart, I need to use the date variable in place of '1/1/2013'.&amp;nbsp; But you migh have other suggestions as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all of your help.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 14:09:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461060#M1156102</guid>
      <dc:creator />
      <dc:date>2013-02-22T14:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I anchor dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461061#M1156103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be something like this, although you may need to play around with it to suit your actual data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 14:35:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461061#M1156103</guid>
      <dc:creator />
      <dc:date>2013-02-22T14:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I anchor dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461062#M1156104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rebecca.&amp;nbsp; This is extremely helpful.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One question on the variable you created, did you input the min and max based upon the data set I provided or was QlikView able to create these in some manner?&amp;nbsp; When I created my slider/calendar object and selected vSearchDate, the min/max was not provided.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just wondering if this is a necessary manual step for each data set I have.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 17:29:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461062#M1156104</guid>
      <dc:creator />
      <dc:date>2013-02-22T17:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I anchor dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461063#M1156105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No I created them just to give you a small snapshot. You can either use an expression to calculate it or do what I did and enter static mins and maxes. It's located on the General tab of the properties. I think it generally defaults to Min 0 and Max 10, so of course you will need to adjust it.&amp;nbsp; An example of an equation would be =Min(TOTAL ShipDate) for the min.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 18:29:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-anchor-dates/m-p/461063#M1156105</guid>
      <dc:creator />
      <dc:date>2013-02-22T18:29:47Z</dc:date>
    </item>
  </channel>
</rss>

