<?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: Help with Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413203#M488299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any other idea without using the "Concat" function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Jan 2013 13:57:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-01-11T13:57:07Z</dc:date>
    <item>
      <title>Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413199#M488295</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;I have some issues calculating in set analysis.&lt;/P&gt;&lt;P&gt;This is my data. I have many transacionID per contract. What I'm trying to do is to get the Amount on the Max of TransactionID, within the date range (date entered by an user) and when ObjectID = 615. So the red boxes are the Max TransactionID between 10/1/2011 and 9/30/2012.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="28988" class="jive-image-thumbnail jive-image" height="267" onclick="" alt="Data.png" src="https://community.qlik.com/legacyfs/online/28988_Data.png" width="654" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have calculated the Max of the TransactionID like this: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Max({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;={'&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)'}&amp;gt;}&lt;SPAN style="color: #800000;"&gt;TransactionID&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;This works fine, but then I want to get the Amount including the above set analysis and does not work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;IMG __jive_id="28989" class="jive-image" alt="data2.png" src="https://community.qlik.com/legacyfs/online/28989_data2.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I have tried 2 options:&lt;/P&gt;&lt;P&gt;1. This calculation give me the results only when clicking a Contract, and that is not what I'm looking for. I want to always display the values&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Sum ({&amp;lt;TransactionID={$(=Max({&amp;lt;Date={'&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)'}&amp;gt;}TransactionID))}, ObjectID={615}&amp;gt;}Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;2. This gives me something else but not the solution&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Sum ({&amp;lt;TransactionID={"=Max({&amp;lt;Date={'&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)'}&amp;gt;}TransactionID)"}, ObjectID={615}&amp;gt;}distinct Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;The expected resultd should be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 157px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;Contract&lt;/TD&gt;&lt;TD width="93"&gt;Amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;20101214&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none;"&gt;450.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: medium none;"&gt;0129724&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0.00 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: medium none;"&gt;0140259&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;100.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: medium none;"&gt;0141061&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;250.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: medium none;"&gt;0141731&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;500.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: medium none;"&gt;0153724&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;0.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: medium none;"&gt;0155313&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;950.00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;//0129724 is 0 because does not satisfy the condition of Obj=615 on the Max. Transaction ID which is 1003&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? Attached are my files. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 03:40:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413199#M488295</guid>
      <dc:creator />
      <dc:date>2013-01-11T03:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413200#M488296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;Sum ({&amp;lt;TransactionID={$(=Concat(aggr(max(TransactionID), Contract), ', '))}, Date={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}, ObjectID={615}&amp;gt;}Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 11:01:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413200#M488296</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2013-01-11T11:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413201#M488297</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;Please find the file attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 13:28:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413201#M488297</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-01-11T13:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413202#M488298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Fernado. The expression works, but the issue is my data set is huge. I have millions of transactions and the "Concat" function is taking forever to get all the values for a specific date. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 13:36:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413202#M488298</guid>
      <dc:creator />
      <dc:date>2013-01-11T13:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413203#M488299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any other idea without using the "Concat" function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 13:57:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413203#M488299</guid>
      <dc:creator />
      <dc:date>2013-01-11T13:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413204#M488300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue( {&amp;lt;Date={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;} &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; aggr(sum({&amp;lt; ObjectID={615}&amp;gt;} Amount),TransactionID), &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -TransactionID )&lt;/P&gt;&lt;P&gt; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 14:09:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413204#M488300</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-01-11T14:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413205#M488301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks swuehl!! This worked really good. Could you explain please how the FirstSortedValue function worked for this case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 14:21:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413205#M488301</guid>
      <dc:creator />
      <dc:date>2013-01-11T14:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413206#M488302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try this?&amp;nbsp; I just want to see the performance difference. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this should reduce the amount of data in Concat() portion. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;TransactionID={$(=concat(aggr(Max({&amp;lt;Date={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}TransactionID), Contract),', '))}, ObjectID={615}&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 14:49:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis/m-p/413206#M488302</guid>
      <dc:creator />
      <dc:date>2013-01-11T14:49:04Z</dc:date>
    </item>
  </channel>
</rss>

