<?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: Get dynamically a flag from a different date in Water Cooler</title>
    <link>https://community.qlik.com/t5/Water-Cooler/Get-dynamically-a-flag-from-a-different-date/m-p/1509739#M6170</link>
    <description>I can't open your file because I work with Sense, and with QlikView, I already opend 3 times different apps so I was blocked. In the next days I will receive a qlik license from a friend, I will take a look on your file and come back to you.&lt;BR /&gt;&lt;BR /&gt;THanks</description>
    <pubDate>Tue, 20 Nov 2018 13:38:23 GMT</pubDate>
    <dc:creator>parayu</dc:creator>
    <dc:date>2018-11-20T13:38:23Z</dc:date>
    <item>
      <title>Get dynamically a flag from a different date</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Get-dynamically-a-flag-from-a-different-date/m-p/1507871#M5536</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have this scenario:&lt;/P&gt;&lt;P&gt;Table:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Date, Customer, ArrangementID, Exposure, Flag,&lt;BR /&gt;2018-07-30, Alex, 11, 90, Y,&lt;BR /&gt;2018-07-30, Jack, 21, 200, N,&lt;BR /&gt;2018-08-31, Alex, 11, 100, N,&lt;BR /&gt;2018-08-31, Alex, 12, 500, N,&lt;BR /&gt;2018-08-31, Jack, 21, 220, N,&lt;BR /&gt;2018-09-30, Alex, 11, 300, N,&lt;BR /&gt;2018-09-30, Jack, 21, 250, Y,&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;I want to select first Date (&lt;SPAN&gt;2018-07-30)&lt;/SPAN&gt;,&amp;nbsp; and then I want to create a calculated dimension or measure that will get me on the same line, the Flag from a future date (&lt;SPAN&gt;2018-09-30) . I want to hardcode the date(in the expression) for now, but in the future I will use an imput box and a variable for that Date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I expect that my&amp;nbsp;result would be like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Date, Customer, ArrangementID, Exposure, Flag, &lt;STRONG&gt;CalculatedFlag&lt;/STRONG&gt;&lt;BR /&gt;2018-07-30, Alex, 11, 90, Y,&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;N&lt;/STRONG&gt;&lt;BR /&gt;2018-07-30, Jack, 21, 200, N, &lt;STRONG&gt;Y&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you please tell me if this is possible in Qlik Sense?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bogdan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 09:46:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Get-dynamically-a-flag-from-a-different-date/m-p/1507871#M5536</guid>
      <dc:creator>parayu</dc:creator>
      <dc:date>2018-11-16T09:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Get dynamically a flag from a different date</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Get-dynamically-a-flag-from-a-different-date/m-p/1507885#M5542</link>
      <description>&lt;P&gt;can you please explain your requirement bit clear ?&lt;/P&gt;&lt;P&gt;Does not understand what you want to do.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 09:57:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Get-dynamically-a-flag-from-a-different-date/m-p/1507885#M5542</guid>
      <dc:creator>agni_gold</dc:creator>
      <dc:date>2018-11-16T09:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get dynamically a flag from a different date</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Get-dynamically-a-flag-from-a-different-date/m-p/1507986#M5587</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I think what you're saying is that you want to look up the Flag of the ArrangmentID in the current row but for a different date, in this case for 2018-09-30. This probably isn't the most optimal solution, but I think it works, PFA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So because you're essentially wanting to look up a value based on 2 fields (ArrangementID and Date), I had to create 2 combined fields, one for the value to look up, and one to look up the value in*. I created 2 different LookupV's, one for your hardcoded date, and one as an example of how you can do this using a dynamic date (in this case by adding 2 months to the date in the current row). Make sure to only uncomment one at a time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this is what you're looking for, if not let me know &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*LookupV can probably be calculated in the Lookup function instead, but this way I was able to check the value it was trying to look up. Performance wise it might be better to move the definition for LookupV to the Lookup function, but I'm not sure&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 12:00:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Get-dynamically-a-flag-from-a-different-date/m-p/1507986#M5587</guid>
      <dc:creator>jensmunnichs</dc:creator>
      <dc:date>2018-11-16T12:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get dynamically a flag from a different date</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Get-dynamically-a-flag-from-a-different-date/m-p/1509739#M6170</link>
      <description>I can't open your file because I work with Sense, and with QlikView, I already opend 3 times different apps so I was blocked. In the next days I will receive a qlik license from a friend, I will take a look on your file and come back to you.&lt;BR /&gt;&lt;BR /&gt;THanks</description>
      <pubDate>Tue, 20 Nov 2018 13:38:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Get-dynamically-a-flag-from-a-different-date/m-p/1509739#M6170</guid>
      <dc:creator>parayu</dc:creator>
      <dc:date>2018-11-20T13:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get dynamically a flag from a different date</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Get-dynamically-a-flag-from-a-different-date/m-p/1509751#M6176</link>
      <description>Right, my mistake, here is the script in case you don't want to wait. It's currently set to dynamically look at the current date + 2 months:&lt;BR /&gt;(p.s. I also just realised I called the final table Temp2, should probably change that to 'final' or something)&lt;BR /&gt;&lt;BR /&gt;Table:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Date, Customer, ArrangementID, Exposure, Flag,&lt;BR /&gt;2018-07-30, Alex, 11, 90, Y,&lt;BR /&gt;2018-07-30, Jack, 21, 200, N,&lt;BR /&gt;2018-08-31, Alex, 11, 100, N,&lt;BR /&gt;2018-08-31, Alex, 12, 500, N,&lt;BR /&gt;2018-08-31, Jack, 21, 220, N,&lt;BR /&gt;2018-09-30, Alex, 11, 300, N,&lt;BR /&gt;2018-09-30, Jack, 21, 250, Y,&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;Temp:&lt;BR /&gt;LOAD *,&lt;BR /&gt;Date(Date#(Date, 'YYYY-MM-DD'), 'YYYY-MM-DD') &amp;amp; ArrangementID as Combo,&lt;BR /&gt;// '2018-09-30' &amp;amp; ' ' &amp;amp; ArrangementID as LookupV //Uncomment for hardcoded date&lt;BR /&gt;Date(AddMonths(Date, 2), 'YYYY-MM-DD') &amp;amp; ArrangementID as LookupV //Uncomment for dynamic date&lt;BR /&gt;Resident Table;&lt;BR /&gt;&lt;BR /&gt;Drop table Table;&lt;BR /&gt;&lt;BR /&gt;Temp2:&lt;BR /&gt;LOAD *,&lt;BR /&gt;Lookup('Flag', 'Combo', LookupV, 'Temp') as Flag2&lt;BR /&gt;Resident Temp;&lt;BR /&gt;&lt;BR /&gt;Drop table Temp;&lt;BR /&gt;Drop Field Combo;&lt;BR /&gt;Drop Field LookupV;</description>
      <pubDate>Tue, 20 Nov 2018 13:47:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Get-dynamically-a-flag-from-a-different-date/m-p/1509751#M6176</guid>
      <dc:creator>jensmunnichs</dc:creator>
      <dc:date>2018-11-20T13:47:33Z</dc:date>
    </item>
  </channel>
</rss>

