<?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 Peek for charts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004222#M650466</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure the best approach to this and the simplyest way I can explain this is possibly finding a way to do what peek() does in a chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, I am looking to pull the previous date so that it can be used in a days since calculation. To complicate things I have to be flexible on the previous date as these dates all tie to different locations. Take this example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EventDate&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&lt;/P&gt;&lt;P&gt;01/01/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit1&lt;/P&gt;&lt;P&gt;02/05/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit2&lt;/P&gt;&lt;P&gt;03/15/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit1&lt;/P&gt;&lt;P&gt;03/25/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From this you can see that Unit1 has two event dates (01/01/15, 03/15/15) and Unit2 has two event dates (02/05/15, 03/25/15). What I would like to do is identify how many days between each event given the selected location and if no location is selected I would return the number of days between event date above it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried a few different things and I have found that Peek() works pretty well in the script but doesnt account for what location the user might choose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the expected output:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Location Unit1 selected&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;EventDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DaysSince&lt;/P&gt;&lt;P&gt;01/01/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Null&lt;/P&gt;&lt;P&gt;03/15/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit1&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; 73&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Location Unit2 selected&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;EventDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DaysSince&lt;/P&gt;&lt;P&gt;02/05/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Null&lt;/P&gt;&lt;P&gt;03/25/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit2&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; 48&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions on how best to handle this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Sep 2015 17:35:31 GMT</pubDate>
    <dc:creator>cbushey1</dc:creator>
    <dc:date>2015-09-22T17:35:31Z</dc:date>
    <item>
      <title>Peek for charts</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004222#M650466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure the best approach to this and the simplyest way I can explain this is possibly finding a way to do what peek() does in a chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, I am looking to pull the previous date so that it can be used in a days since calculation. To complicate things I have to be flexible on the previous date as these dates all tie to different locations. Take this example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EventDate&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&lt;/P&gt;&lt;P&gt;01/01/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit1&lt;/P&gt;&lt;P&gt;02/05/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit2&lt;/P&gt;&lt;P&gt;03/15/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit1&lt;/P&gt;&lt;P&gt;03/25/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From this you can see that Unit1 has two event dates (01/01/15, 03/15/15) and Unit2 has two event dates (02/05/15, 03/25/15). What I would like to do is identify how many days between each event given the selected location and if no location is selected I would return the number of days between event date above it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried a few different things and I have found that Peek() works pretty well in the script but doesnt account for what location the user might choose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the expected output:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Location Unit1 selected&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;EventDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DaysSince&lt;/P&gt;&lt;P&gt;01/01/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Null&lt;/P&gt;&lt;P&gt;03/15/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit1&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; 73&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Location Unit2 selected&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;EventDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DaysSince&lt;/P&gt;&lt;P&gt;02/05/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Null&lt;/P&gt;&lt;P&gt;03/25/15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit2&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; 48&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions on how best to handle this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 17:35:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004222#M650466</guid>
      <dc:creator>cbushey1</dc:creator>
      <dc:date>2015-09-22T17:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Peek for charts</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004223#M650467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chase,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the front-end solution:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99714_Capture.PNG" style="height: 249px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you need the back-end solution as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 17:47:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004223#M650467</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-09-22T17:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Peek for charts</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004224#M650468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here you have the script solution &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;P&gt;Hope it is what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Patric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 18:10:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004224#M650468</guid>
      <dc:creator>pamaxeed</dc:creator>
      <dc:date>2015-09-22T18:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Peek for charts</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004225#M650469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Back end solution could be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(Date#(EventDate, 'MM/DD/YY')) as EventDate,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Location;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EventDate,&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;01/01/15,&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;02/05/15,&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;03/15/15,&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;03/25/15,&amp;nbsp;&amp;nbsp;&amp;nbsp; Unit2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NewTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD EventDate,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Location,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Peek('Location') = Location, RangeSum(EventDate - Peek('EventDate'))) as DaysSince&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By Location, EventDate;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99706_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 18:16:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004225#M650469</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-09-22T18:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Peek for charts</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004226#M650470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like both of these options but I have realized one small issue. If I want to just compare the EventDate to the previous one without regards for Location then these solutions wont work. This isnt a huge deal as I believe I could create a graph with each expression representing a different location.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 20:02:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004226#M650470</guid>
      <dc:creator>cbushey1</dc:creator>
      <dc:date>2015-09-22T20:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Peek for charts</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004227#M650471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you can create a separate DaysSince for just Date or you can make &lt;A _jive_internal="true" href="https://community.qlik.com/people/sinanozdemir"&gt;Sinan&lt;/A&gt;‌'s front end solution to be dynamic so that you can compare it with regards to location or by disregarding location with a button click.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ultimately it all depends on what your requirement is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 03:30:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-for-charts/m-p/1004227#M650471</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-09-23T03:30:27Z</dc:date>
    </item>
  </channel>
</rss>

