<?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: Select a value based on another value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263837#M398332</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your suggestion. However, I'm not sure it's working as intended.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested it using a straight table, with columns from the CM table and the status; but where there were multiple CME records in the quarter (so multiple statuses), the script above seemed to be returning multiple values and so the column just showed "-". I'm just guessing that is the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or could this be because the max date in the quarter isn't the same as the max date of the CME record?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2017 14:27:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-02-27T14:27:18Z</dc:date>
    <item>
      <title>Select a value based on another value</title>
      <link>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263835#M398330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm struggling with how to implement something, even from a conceptual point of view, in Qlikview. I've got 2 tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CM&amp;nbsp; (this is a basic "item")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID&amp;nbsp; (primary key)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DESC (textual description)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CME (this is a history log of the item it links to)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID (primary key)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CM_ID (FK to CM.ID)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE (linked to a master calender)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STATUS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;The CME table is effectively the "history table" of the CM entities. &lt;/SPAN&gt;The issue I have is that I want my report to be periodic. So given particular date selections that the report has (which are all linked to a master calendar) I want to be able to say what the STATUS was of the CM item at the given point in time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to complicate things, CMEs are not created daily, so the status of a CM at a selected time period is defined as the status of the CME record with the highest date just within the selected date range. So if someone selects Q4 2016 within the report, and a particular CM has 2 CMEs in Q4 with dates 10/12/2016 and 15/12/2016, it would be the status of the CME record with the 15th of Dec datestamp that I'd need to be returned. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need this status to be easily accessible from various charts and tables too, almost like the status is part of the actual CM record, since it's a common thing to show against a CM (or use as a dimension in charts).&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>Fri, 24 Feb 2017 17:51:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263835#M398330</guid>
      <dc:creator />
      <dc:date>2017-02-24T17:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Select a value based on another value</title>
      <link>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263836#M398331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you could use the max(DATE)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this &lt;/P&gt;&lt;P&gt;only({&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;DATE&lt;/SPAN&gt;={"=&lt;SPAN style="font-size: 13.3333px;"&gt;max(DATE)&lt;/SPAN&gt;"}&amp;gt;}&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;STATUS&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;this will give the Status with the Max date in the quarter &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;max(DATE)..this will give the DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;how you are defining the range using the variables ? then we need to include the range values in the the set analysis &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2017 18:21:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263836#M398331</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2017-02-24T18:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Select a value based on another value</title>
      <link>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263837#M398332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your suggestion. However, I'm not sure it's working as intended.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested it using a straight table, with columns from the CM table and the status; but where there were multiple CME records in the quarter (so multiple statuses), the script above seemed to be returning multiple values and so the column just showed "-". I'm just guessing that is the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or could this be because the max date in the quarter isn't the same as the max date of the CME record?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 14:27:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263837#M398332</guid>
      <dc:creator />
      <dc:date>2017-02-27T14:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Select a value based on another value</title>
      <link>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263838#M398333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need to check the data model ...share the app let me check &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 16:13:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263838#M398333</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2017-02-27T16:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Select a value based on another value</title>
      <link>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263839#M398334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you send me a PM please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2017 15:22:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263839#M398334</guid>
      <dc:creator />
      <dc:date>2017-02-28T15:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Select a value based on another value</title>
      <link>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263840#M398335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the delay, I had to remove a bunch of sensitive things from the app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the app here. I've annotated some unexpected behaviour with some text boxes within it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Mar 2017 12:20:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263840#M398335</guid>
      <dc:creator />
      <dc:date>2017-03-02T12:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: Select a value based on another value</title>
      <link>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263841#M398336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anybody?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2017 11:00:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263841#M398336</guid>
      <dc:creator />
      <dc:date>2017-03-08T11:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Select a value based on another value</title>
      <link>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263842#M398337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check the doc I have updated the logic in your file ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2017 13:09:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263842#M398337</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2017-03-08T13:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Select a value based on another value</title>
      <link>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263843#M398338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much. I will go and test it today to make sure it works in all conditions, but initially it's looking great.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I see what you did (resolve a variable to the max date rather than put it in the script), but I'm not sure why that works over just having it inside the script. What is the difference?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 08:39:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263843#M398338</guid>
      <dc:creator />
      <dc:date>2017-03-09T08:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Select a value based on another value</title>
      <link>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263844#M398339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Implementation would be much cleaner and you can use the same variable in many chart ..other than that it does not have any impact &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 09:50:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-a-value-based-on-another-value/m-p/1263844#M398339</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2017-03-09T09:50:40Z</dc:date>
    </item>
  </channel>
</rss>

