<?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 Date in Set Analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Date-in-Set-Analysis/m-p/77288#M5150</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 have the two tables in the image below.&amp;nbsp; ID Number 1A564DDS has three TransactionDates shown in the top table and has MonthEnd Price's shown in the bottom table.&amp;nbsp; I want to write an expression that shows the Price at the time of the transaction.&amp;nbsp; I have tried using the expression Only({&amp;lt;[Data As Of Date] = {"$(=Date(MonthEnd(TransactionDate),'M/DD/YYYY'))"}&amp;gt;}[Price - Hist]) and its giving me null values.&amp;nbsp; When I hard code a date such as &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;Only({&amp;lt;[Data As Of Date] = {'11/30/2017'}&amp;gt;}[Price - Hist])&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;It gives me what I expect.&amp;nbsp; Does anyone know how to accomplish what I am trying to do?&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;P&gt;&lt;IMG alt="TransactionDates.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/206184_TransactionDates.png" style="height: 180px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2018 20:38:37 GMT</pubDate>
    <dc:creator>m_perreault</dc:creator>
    <dc:date>2018-06-25T20:38:37Z</dc:date>
    <item>
      <title>Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Date-in-Set-Analysis/m-p/77288#M5150</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 have the two tables in the image below.&amp;nbsp; ID Number 1A564DDS has three TransactionDates shown in the top table and has MonthEnd Price's shown in the bottom table.&amp;nbsp; I want to write an expression that shows the Price at the time of the transaction.&amp;nbsp; I have tried using the expression Only({&amp;lt;[Data As Of Date] = {"$(=Date(MonthEnd(TransactionDate),'M/DD/YYYY'))"}&amp;gt;}[Price - Hist]) and its giving me null values.&amp;nbsp; When I hard code a date such as &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;Only({&amp;lt;[Data As Of Date] = {'11/30/2017'}&amp;gt;}[Price - Hist])&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;It gives me what I expect.&amp;nbsp; Does anyone know how to accomplish what I am trying to do?&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;P&gt;&lt;IMG alt="TransactionDates.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/206184_TransactionDates.png" style="height: 180px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 20:38:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-in-Set-Analysis/m-p/77288#M5150</guid>
      <dc:creator>m_perreault</dc:creator>
      <dc:date>2018-06-25T20:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Date-in-Set-Analysis/m-p/77289#M5151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Monthend() returned no date else a timestamp which means you need an additionally rounding like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only({&amp;lt;[Data As Of Date] = {"$(=Date(&lt;STRONG&gt;floor(&lt;/STRONG&gt;MonthEnd(TransactionDate)&lt;STRONG&gt;)&lt;/STRONG&gt;,'M/DD/YYYY'))"}&amp;gt;}[Price - Hist])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further you need to ensure that there is only a single TransactionDate is available and otherwise this call will return NULL because there is no aggregation like max(TransactionDate).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I look again on your screenshot it looked that you want to apply this expression on a record-level which couldn't work in this way because you used a $-sign expansion which mean that this part is globally calculated before the other parts of the expression and used there for each row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could try it without the $-sign expansion but it don't worked in each case but maybe&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only({&amp;lt;[Data As Of Date] =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"=[Data As Of Date]=Date(&lt;STRONG&gt;floor(&lt;/STRONG&gt;MonthEnd(TransactionDate)&lt;STRONG&gt;)&lt;/STRONG&gt;,'M/DD/YYYY')"}&amp;gt;}&lt;/P&gt;&lt;P&gt;[Price - Hist])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 11:40:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-in-Set-Analysis/m-p/77289#M5151</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-06-26T11:40:20Z</dc:date>
    </item>
  </channel>
</rss>

