<?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: calculated dimension in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103987#M365768</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The expression you have used is not possible, but what exactly are you trying to do? May be there are alternatives&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jun 2016 19:27:10 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-06-13T19:27:10Z</dc:date>
    <item>
      <title>calculated dimension in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103986#M365767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;is it possible to create calculated dimension in Load script ? here is the expression I'm trying to use but its not working&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MonthYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MonthYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Getselectedcount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(MonthYear)) as PreviousSelection&lt;BR /&gt; &lt;BR /&gt; resident CHC &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2016 19:25:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103986#M365767</guid>
      <dc:creator>arusanah</dc:creator>
      <dc:date>2016-06-13T19:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: calculated dimension in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103987#M365768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The expression you have used is not possible, but what exactly are you trying to do? May be there are alternatives&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2016 19:27:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103987#M365768</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-13T19:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: calculated dimension in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103988#M365769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to find sum sales of previous&amp;nbsp; # of months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example if user selected Jan-Feb sum(sales) is gonna give sales for current selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with below expression&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MonthYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Getselectedcount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(MonthYear))&amp;nbsp; I can go back three months i.e( Oct-Dec) . &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;how do I write expression to find sale for OCT-DEC&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2016 19:34:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103988#M365769</guid>
      <dc:creator>arusanah</dc:creator>
      <dc:date>2016-06-13T19:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: calculated dimension in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103989#M365770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you look at my response here?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/220603"&gt;Logic help&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2016 19:40:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103989#M365770</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-13T19:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: calculated dimension in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103990#M365771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try to avoid creating multiple threads coping with more or less the same topic (I've counted four).&lt;/P&gt;&lt;P&gt;It just makes it hard to follow a discussion and clutters the forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead, please try to give feedback to the support offered and clarify any open questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use the selected count in your addmonths() function, I think you would need to use something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;MonthYear&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,-$(=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;Getselectedcount&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;(MonthYear)) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or create a variable that hold the selected count and use the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, just modifying what Sunny suggested in one of the other threads:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;If(Sum(Sales)/Sum({&amp;lt;Date = {"$(='&amp;gt;=' &amp;amp; Date(AddMonths(Min(Date), -&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$(=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000; font-size: 10pt;"&gt;Getselectedcount&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;(MonthYear))&lt;/SPAN&gt;), 'DateFieldFormatHere') &amp;amp; '&amp;lt;=' &amp;amp;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Date(AddMonths(Max(Date), -&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$(=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000; font-size: 10pt;"&gt;Getselectedcount&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(MonthYear))&lt;/SPAN&gt;)&lt;/SPAN&gt;, 'DateFieldFormatHere')&lt;/SPAN&gt;)"}, Month, Year, Week, MonthYear&amp;gt;}Sales) &amp;gt; 1, 'Sales Increased', 'Sales Decreased')&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;This should be used in a front end expression, not in your load script.&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;If this does not work out of the box (which it probably won't), it would be most easy to help you if you create a small sample QVW and &lt;SPAN style="text-decoration: underline;"&gt;attach it to this thread.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Regards,&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;A _jive_internal="true" data-command="like" data-object-id="1060056" data-object-type="2" href="https://community.qlik.com/thread/220603" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;"&gt;Logic help&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2016 19:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103990#M365771</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-13T19:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: calculated dimension in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103991#M365772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi arausanah,&lt;/P&gt;&lt;P&gt;You can't use&lt;STRONG&gt; GetSelectedCount &lt;/STRONG&gt;on script. This may be calculated on line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 06:59:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-dimension-in-script/m-p/1103991#M365772</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-14T06:59:38Z</dc:date>
    </item>
  </channel>
</rss>

