<?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: Variable in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-in-set-analysis/m-p/1199984#M876900</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue(Ending_Balance, -Period)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Oct 2016 19:00:55 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-10-28T19:00:55Z</dc:date>
    <item>
      <title>Variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-set-analysis/m-p/1199981#M876897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;I have a table that contains Ending balance for each period for each product&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/142385_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Then I created variable to display the most recent period for each project: vLastEndingBalance = Aggr(max(Period),[Project ID]).&lt;/P&gt;&lt;P&gt;Then I would like to create a pivot table that will show me the project ID and Ending Balance based on period selection, but when no period selected it should present the balance for most recent period.&lt;/P&gt;&lt;P&gt;So I created a pivot table with dimension "Project ID" and as expression I have:&lt;/P&gt;&lt;P&gt; =only({&amp;lt;Period ={"=$(=vLastEndingBalance)"}&amp;gt;} Ending_Balance).&lt;/P&gt;&lt;P&gt;It works fine when I select Period but when there is no selection the results of the expression gives me the earliest balance instead of recent&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture12.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/142386_Capture12.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you kindly let me know where I have a problem.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-set-analysis/m-p/1199981#M876897</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-set-analysis/m-p/1199982#M876898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using below expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=only({&amp;lt;Period ={"=$(vLastEndingBalance)"}&amp;gt;} Ending_Balance).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 18:56:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-set-analysis/m-p/1199982#M876898</guid>
      <dc:creator>krishnacbe</dc:creator>
      <dc:date>2016-10-28T18:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-set-analysis/m-p/1199983#M876899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure, but may be try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=Only({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Project ID] &lt;/SPAN&gt;= {"=Period = Max(TOTAL Period)"}&amp;gt;} Ending_Balance)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 18:59:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-set-analysis/m-p/1199983#M876899</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-28T18:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-set-analysis/m-p/1199984#M876900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue(Ending_Balance, -Period)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 19:00:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-set-analysis/m-p/1199984#M876900</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-28T19:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-set-analysis/m-p/1199985#M876901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That one worked!&lt;/P&gt;&lt;P&gt;Thank you Sunny.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 19:54:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-set-analysis/m-p/1199985#M876901</guid>
      <dc:creator />
      <dc:date>2016-10-28T19:54:13Z</dc:date>
    </item>
  </channel>
</rss>

