<?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: Using set analysis to get Max Value regardless of selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633290#M232319</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, that expression didn't work.&lt;/P&gt;&lt;P&gt;I also have Month and Year as separate values (i get to them by trimming {Year Month]) I got an idea of putting "Year = , Month = " in the set analysis, but that didn't work either.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 May 2014 02:16:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-05-30T02:16:42Z</dc:date>
    <item>
      <title>Using set analysis to get Max Value regardless of selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633285#M232314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I'm trying to compare Prior Year and Current year, so what I'm doing is grabbing the current [Year Month] selection, subtracting it by 100 &lt;/P&gt;&lt;P&gt;and using set analysis to force it onto the expression:&lt;/P&gt;&lt;P&gt;=num(sum({&amp;lt;[Year Month] =&amp;nbsp; {$(=v_MaxYearMonth-100)}, [Type] = {'P'}&amp;gt;}[Count]),'#,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have set as v_MaxYearMonth =Max({1}[Year Month])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I verified that v_MaxYearMonth works, but the sum expression does not for all [Year Month] selections, it returns the sum only if the selection is 201305 (which incidentally is this 201405 - 100), but returns 0 otherwise&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe I'm missing something obvious, but I've been pondering on this for hours, and I got nothing...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 23:09:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633285#M232314</guid>
      <dc:creator />
      <dc:date>2014-05-29T23:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using set analysis to get Max Value regardless of selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633286#M232315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To get same month of previous year I usually use Month={$(=Month(AddMonths(Max(Calendar.Date), -12)))},&lt;/P&gt;&lt;P&gt;Year={$(=Year(AddMonths(Max(Calendar.Date), -12)))}, Calendar.Date=&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you'd like advice for your approach, please share a sample app.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 01:19:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633286#M232315</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-05-30T01:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using set analysis to get Max Value regardless of selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633287#M232316</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;Why you are subtracting 100 from v_MaxYearMonth, do you want what is your Year Month format, if you use -100 the month is returned as numeric value, not as month, that is why the expression is not working, can you attach some sample data and expected output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this expression, hope it helps you&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;"&gt;=num(sum({&amp;lt;[Year Month] =&amp;nbsp; {"$(=Date(Date#(v_MaxYearMonth, 'YYYYMM')-100, 'YYYYMM'))"}, [Type] = {'P'}&amp;gt;}[Count]),'#,##0')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 01:46:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633287#M232316</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-05-30T01:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using set analysis to get Max Value regardless of selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633288#M232317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, actually my year month format is YYYYMM so for example current year month is 201405&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 02:05:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633288#M232317</guid>
      <dc:creator />
      <dc:date>2014-05-30T02:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using set analysis to get Max Value regardless of selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633289#M232318</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;Is that expression working?&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, 30 May 2014 02:13:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633289#M232318</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-05-30T02:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using set analysis to get Max Value regardless of selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633290#M232319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, that expression didn't work.&lt;/P&gt;&lt;P&gt;I also have Month and Year as separate values (i get to them by trimming {Year Month]) I got an idea of putting "Year = , Month = " in the set analysis, but that didn't work either.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 02:16:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633290#M232319</guid>
      <dc:creator />
      <dc:date>2014-05-30T02:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using set analysis to get Max Value regardless of selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633291#M232320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the record, it works when i DO select 201305 in my selections.. WEIRD..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 02:19:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633291#M232320</guid>
      <dc:creator />
      <dc:date>2014-05-30T02:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using set analysis to get Max Value regardless of selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633292#M232321</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;Why you are subtracting -100 in your expression? Can you comeup with sample file and expected output?&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, 30 May 2014 02:22:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633292#M232321</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-05-30T02:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using set analysis to get Max Value regardless of selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633293#M232322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;subtracting 100 to get to last year. i'm trying to show the results of last year compared to this year.&lt;/P&gt;&lt;P&gt;So,&lt;/P&gt;&lt;P&gt;When a user selects 201405, i have one expression showing a result for that. then i want to use a set expression to show what happened in 201305&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 02:26:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633293#M232322</guid>
      <dc:creator />
      <dc:date>2014-05-30T02:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using set analysis to get Max Value regardless of selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633294#M232323</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;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;"&gt;=num(sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;YearDimensionName&lt;/SPAN&gt;={'$(=Max(YearDimensionName) -1)'}, [Type] = {'P'}&amp;gt;}[Count]),'#,##0')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Replace Year with your YearDimensionName.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=num(sum({&amp;lt;[Year Month] =&amp;nbsp; {"$(=Date(MonthStart(Date#(v_MaxYearMonth, 'YYYYMM')-100, -12), 'YYYYMM'))"}, [Type] = {'P'}&amp;gt;}[Count]),'#,##0')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 02:33:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633294#M232323</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-05-30T02:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using set analysis to get Max Value regardless of selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633295#M232324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BINGO!!! you got it!!! thank you &lt;A href="https://community.qlik.com/qlik-users/23109"&gt;Jagan Mohan&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI: I just set the Year to -1 as per your first suggestion&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 02:37:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-set-analysis-to-get-Max-Value-regardless-of-selection/m-p/633295#M232324</guid>
      <dc:creator />
      <dc:date>2014-05-30T02:37:49Z</dc:date>
    </item>
  </channel>
</rss>

