<?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: How to write script expressions that sets certain months in a formula? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1608244#M45127</link>
    <description>try something like below&lt;BR /&gt;Sum({&amp;lt;DateKey.autoCalendar.Month={'April','May'}&amp;gt;}Sales)&lt;BR /&gt;</description>
    <pubDate>Wed, 31 Jul 2019 19:45:03 GMT</pubDate>
    <dc:creator>dplr-rn</dc:creator>
    <dc:date>2019-07-31T19:45:03Z</dc:date>
    <item>
      <title>How to write script expressions that sets certain months in a formula?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1608124#M45118</link>
      <description>&lt;P&gt;I am a complete newbie to Qlik Sense Desktop and don't understand the syntax and how it applies to my case.&lt;/P&gt;&lt;P&gt;I have made a Bar diagram with Product as dimension and now need a measure like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum(Sales Amount) for the months April to November /&amp;nbsp;Sum(Sales Amount) for the months December to March&amp;nbsp;&lt;/P&gt;&lt;P&gt;(where / is divided by, the normal algebraic operator) This will show the products that sell relatively bad during the period Dec-March.&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this using DateKey.autoCalendar.Month, I guess.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would the complete expression for the script editor be, including the formula with set expressions?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 15:14:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1608124#M45118</guid>
      <dc:creator>etxgmg</dc:creator>
      <dc:date>2019-07-31T15:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to write script expressions that sets certain months in a formula?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1608244#M45127</link>
      <description>try something like below&lt;BR /&gt;Sum({&amp;lt;DateKey.autoCalendar.Month={'April','May'}&amp;gt;}Sales)&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jul 2019 19:45:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1608244#M45127</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-07-31T19:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to write script expressions that sets certain months in a formula?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1608245#M45128</link>
      <description>Expanding on my suggestion. use set analysis. it is a very powerful part of qlik&lt;BR /&gt;&lt;BR /&gt;Sum({&amp;lt;DateKey.autoCalendar.Month -= {'Dec','Jan','Feb','Mar'}&amp;gt;}Sales)&lt;BR /&gt;/ Sum({&amp;lt;DateKey.autoCalendar.Month = {'Dec','Jan','Feb','Mar'}&amp;gt;}Sales)&lt;BR /&gt;&lt;BR /&gt;Denominator - used set analysis to denote i want months Dec-Mar&lt;BR /&gt;on the numerator note i used -= this means all months apart from Dec-Mar (you could just list out the months as well)</description>
      <pubDate>Wed, 31 Jul 2019 20:01:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1608245#M45128</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-07-31T20:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to write script expressions that sets certain months in a formula?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1608404#M45151</link>
      <description>&lt;P&gt;Many thanks, but something is wrong. My formula&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;[Invoice Date].autoCalendar.Month -= {'Dec','Jan','Feb','Mar'}&amp;gt;} [Sales Amount])&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;BR /&gt;Sum({&amp;lt;[Invoice Date].autoCalendar.Month = {'Dec','Jan','Feb','Mar'}&amp;gt;} [Sales Amount])&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;doesn't show anything.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If I just do&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;Sum( [Sales Amount])&lt;BR /&gt;I get a perfect bar graph, but if I do for instance&amp;nbsp;&lt;BR /&gt;Sum({&amp;lt;[Invoice Date].autoCalendar.Month = {'Jan'}&amp;gt;} [Sales Amount])&lt;BR /&gt;or&amp;nbsp;&lt;BR /&gt;Sum({&amp;lt;[Invoice Date].autoCalendar.Month = {1}&amp;gt;} [Sales Amount])&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;then I get nothing.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 09:39:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1608404#M45151</guid>
      <dc:creator>etxgmg</dc:creator>
      <dc:date>2019-08-01T09:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to write script expressions that sets certain months in a formula?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1608454#M45157</link>
      <description>&lt;P&gt;Not sure. I suggest creating an actual master calendar rather than the auto generated one&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 11:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1608454#M45157</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-08-01T11:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to write script expressions that sets certain months in a formula?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1609120#M45234</link>
      <description>&lt;P&gt;I gave up on this. It ought to be the calendar thing that somehow causes me problems, and I am completely new to Qlik.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I came around the problem by using alternate states (winter, notwinter) for the month ranges which I set by filter boxes instead. Then I used the states in the expressions for the measures (my calculations) with set-expressions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum({winter} [Sales Amount])&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;/&amp;nbsp;Sum({notwinter} [Sales Amount])&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I just followed the below guide, and its example, and then it worked!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/April2019/Subsystems/Hub/Content/Sense_Hub/Visualizations/alternate-states-comparative-analysis.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/April2019/Subsystems/Hub/Content/Sense_Hub/Visualizations/alternate-states-comparative-analysis.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks, Dilipranjith, for your effort to help. Highly appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Aug 2019 20:56:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-write-script-expressions-that-sets-certain-months-in-a/m-p/1609120#M45234</guid>
      <dc:creator>etxgmg</dc:creator>
      <dc:date>2019-08-03T20:56:54Z</dc:date>
    </item>
  </channel>
</rss>

