<?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: Set Analysis Over Dimension in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Over-Dimension/m-p/3819#M269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some other alternatives if you didn't want to mess with the script you could either use an if() statement to compare the latest monthID or use FirstSortedValue combined with aggr to get what you need.&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;=Sum(if(MonthID=Max(MonthID),LineSaleAmt))&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;=FirstSortedValue(aggr(sum(LineSalesAmt),MonthID),-MonthID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both solutions would not be very efficient for large amounts of data though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jan 2018 10:11:06 GMT</pubDate>
    <dc:creator>ericasense</dc:creator>
    <dc:date>2018-01-22T10:11:06Z</dc:date>
    <item>
      <title>Set Analysis Over Dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Over-Dimension/m-p/3817#M267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to use set analysis to do point in time reporting across a Fiscal Year. So the current Month, Current month-12....etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sum(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;{$&amp;lt;MonthID = {$(=max(MonthID))}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LineSaleAmt)&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;However the Max(MonthId) part of the set analysis evaluates once, and only once.&amp;nbsp; This makes for a useful and dynamic KPI widget, but not across a dimension. &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;I'd like to replicate the second measure in this chart, which uses a current year flag, but using the monthID instead.&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Set Analysis.PNG" class="jive-image image-1" src="/legacyfs/online/190721_Set Analysis.PNG" style="height: 269px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to get the Max(MonthID) to be evaluated accross a dimension? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2018 17:12:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Over-Dimension/m-p/3817#M267</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-19T17:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Over Dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Over-Dimension/m-p/3818#M268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set analysis, by design is only evaluated once per chart. This is the very reason which makes it more efficient then using if condition which evaluated on row by row basis. From what I understand, you have two options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Use Above() or Below() function&lt;/P&gt;&lt;P&gt;2) Use &lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt;‌. This is a slightly better approach, but requires some intervention in script. But if you are okay with adding a new table in your script... this would be the way to go&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2018 17:21:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Over-Dimension/m-p/3818#M268</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-19T17:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Over Dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Over-Dimension/m-p/3819#M269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some other alternatives if you didn't want to mess with the script you could either use an if() statement to compare the latest monthID or use FirstSortedValue combined with aggr to get what you need.&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;=Sum(if(MonthID=Max(MonthID),LineSaleAmt))&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;=FirstSortedValue(aggr(sum(LineSalesAmt),MonthID),-MonthID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both solutions would not be very efficient for large amounts of data though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2018 10:11:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Over-Dimension/m-p/3819#M269</guid>
      <dc:creator>ericasense</dc:creator>
      <dc:date>2018-01-22T10:11:06Z</dc:date>
    </item>
  </channel>
</rss>

