<?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 Set Analysis Expression Not Working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349316#M129421</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;If you select MAY, When you use:&lt;/P&gt;&lt;P&gt;$(=Max(Month)-1), you are getting 4 and Set analysis is waiting for "Apr"&lt;/P&gt;&lt;P&gt;You should use a function that returns month, not number. this happens because the -1 forces a math function with numeric result.&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;Month={$(=Month(AddMonths(%_DateKey,-1)))}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i were you, I would not use Year and Month separately, but together with MonthYear().&lt;/P&gt;&lt;P&gt;If you do not do this, you will have some troubles while comparing january (could be being compared with NEXT december, not previous).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Hope this helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 May 2012 09:34:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-14T09:34:47Z</dc:date>
    <item>
      <title>Set Analysis Expression Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349314#M129419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is wrong with my expressions?&lt;/P&gt;&lt;P&gt;why does it show total sales for the entire model?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use YearMonth for the Max Month, and it works fine, but I can't for the Prev Month Expression, because it is looking for last year and my model is only for a single year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can I do??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;MAX MONTH&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Month={$(=Max(Month))},&lt;/P&gt;&lt;P&gt;Year,&lt;/P&gt;&lt;P&gt;Quarter,&lt;/P&gt;&lt;P&gt;Month&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;PREVIOUS MONTH&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Month={$(=Max(Month)-1)},&lt;/P&gt;&lt;P&gt;Year,&lt;/P&gt;&lt;P&gt;Quarter,&lt;/P&gt;&lt;P&gt;Month&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 07:24:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349314#M129419</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-14T07:24:53Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349315#M129420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; i guess that is working can you explain somehow&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 09:03:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349315#M129420</guid>
      <dc:creator>sivarajs</dc:creator>
      <dc:date>2012-05-14T09:03:54Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349316#M129421</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;If you select MAY, When you use:&lt;/P&gt;&lt;P&gt;$(=Max(Month)-1), you are getting 4 and Set analysis is waiting for "Apr"&lt;/P&gt;&lt;P&gt;You should use a function that returns month, not number. this happens because the -1 forces a math function with numeric result.&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;Month={$(=Month(AddMonths(%_DateKey,-1)))}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i were you, I would not use Year and Month separately, but together with MonthYear().&lt;/P&gt;&lt;P&gt;If you do not do this, you will have some troubles while comparing january (could be being compared with NEXT december, not previous).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Hope this helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 09:34:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349316#M129421</guid>
      <dc:creator />
      <dc:date>2012-05-14T09:34:47Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349317#M129422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the field YearMonth works for the current year,&lt;/P&gt;&lt;P&gt;but if I use the field Month, it shows all sales in the model&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not really sure what else to explain. I guess I don't know why The field month is showing total sales for the model and not total sales for the specific month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I can't use yearmonth for previous month, because it's looking for the previous year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 09:37:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349317#M129422</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-14T09:37:49Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349318#M129423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;diealgon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure I completely understand what you are suggesting.&lt;/P&gt;&lt;P&gt;are you saying i should use the following expression you suggested directly in the definition of the chart??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;Month={$(=Month(AddMonths(%_DateKey,-1)))}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 06:43:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349318#M129423</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-15T06:43:11Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349319#M129424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The complete expression in the def of the chart would be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;PREVIOUS MONTH&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Month={$(=Month(AddMonths(%_DateKey,-1)))},&lt;/P&gt;&lt;P&gt;Year,&lt;/P&gt;&lt;P&gt;Quarter,&lt;/P&gt;&lt;P&gt;Month&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 12:03:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349319#M129424</guid>
      <dc:creator />
      <dc:date>2012-05-15T12:03:20Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349320#M129425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Month={$(=Month(AddMonths(%_DateKey,-1)))},&lt;/P&gt;&lt;P&gt;Year,&lt;/P&gt;&lt;P&gt;Quarter,&lt;/P&gt;&lt;P&gt;Month&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is returning all sales that exist in the model&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 12:12:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349320#M129425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-15T12:12:05Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349321#M129426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Chris, Do you need to remove the second Month that you have designated in your Set analysis expression?&amp;nbsp; There is no reason to have that in there twice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 14:56:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349321#M129426</guid>
      <dc:creator>oscar_ortiz</dc:creator>
      <dc:date>2012-05-15T14:56:43Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349322#M129427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, there was an extra Month= in the Set analysis.&lt;/P&gt;&lt;P&gt;The complete expression in the def of the chart would be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;PREVIOUS MONTH&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Month={$(=Month(AddMonths(%_DateKey,-1)))},&lt;/P&gt;&lt;P&gt;Year,&lt;/P&gt;&lt;P&gt;Quarter&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 07:40:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349322#M129427</guid>
      <dc:creator />
      <dc:date>2012-05-16T07:40:03Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349323#M129428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That should work, but this one is better:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Month={$(=Month(AddMonths(Max(%_DateKey),-1)))}, Year, Quarter&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 07:44:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349323#M129428</guid>
      <dc:creator />
      <dc:date>2012-05-16T07:44:15Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349324#M129429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris, ¿did it work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 11:50:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-Not-Working/m-p/349324#M129429</guid>
      <dc:creator />
      <dc:date>2012-05-28T11:50:45Z</dc:date>
    </item>
  </channel>
</rss>

