<?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 Using a value in a pivot table as condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-a-value-in-a-pivot-table-as-condition/m-p/462794#M1151692</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to use a value inside a pivot table as a condition for another column(expression)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I'm looking at last year's sales and I wanted to see in a column, for a given item, when has was the last sale made (&lt;STRONG&gt;record_date&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I wrote: &lt;EM&gt;max ({$&amp;lt;doc_type = {"SALES"} , doc_status = {"CLOSED"}&amp;gt;} &lt;STRONG&gt;record_date&lt;/STRONG&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I've found correctly the last record_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since each sale has it's specific document number, I also wanted to find their document number.&lt;/P&gt;&lt;P&gt;The problem is, it's not always in order because the sales aren't always closed in the order they are inserted into the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I find the &lt;STRONG&gt;doc_nr &lt;/STRONG&gt;using the &lt;STRONG&gt;record_date &lt;/STRONG&gt;I've found in&lt;EM&gt; max ({$&amp;lt;doc_type = {"SALES"} , doc_status = {"CLOSED"}&amp;gt;} &lt;STRONG&gt;record_date&lt;/STRONG&gt;)&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 May 2013 15:27:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-05-15T15:27:12Z</dc:date>
    <item>
      <title>Using a value in a pivot table as condition</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-value-in-a-pivot-table-as-condition/m-p/462794#M1151692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to use a value inside a pivot table as a condition for another column(expression)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I'm looking at last year's sales and I wanted to see in a column, for a given item, when has was the last sale made (&lt;STRONG&gt;record_date&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I wrote: &lt;EM&gt;max ({$&amp;lt;doc_type = {"SALES"} , doc_status = {"CLOSED"}&amp;gt;} &lt;STRONG&gt;record_date&lt;/STRONG&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I've found correctly the last record_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since each sale has it's specific document number, I also wanted to find their document number.&lt;/P&gt;&lt;P&gt;The problem is, it's not always in order because the sales aren't always closed in the order they are inserted into the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I find the &lt;STRONG&gt;doc_nr &lt;/STRONG&gt;using the &lt;STRONG&gt;record_date &lt;/STRONG&gt;I've found in&lt;EM&gt; max ({$&amp;lt;doc_type = {"SALES"} , doc_status = {"CLOSED"}&amp;gt;} &lt;STRONG&gt;record_date&lt;/STRONG&gt;)&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 15:27:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-value-in-a-pivot-table-as-condition/m-p/462794#M1151692</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-15T15:27:12Z</dc:date>
    </item>
  </channel>
</rss>

