<?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 How to write the between expression ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1284995#M851148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to get the sum of sales amount for previous 3 months ?&lt;/P&gt;&lt;P&gt;It needs to be flexible , if fiscal year , fiscal period is selected , then the sales should be calulated on the selected value. else max period of sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample model attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/154830_Capture.PNG" style="height: 319px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>suvechha_b</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>How to write the between expression ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1284995#M851148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to get the sum of sales amount for previous 3 months ?&lt;/P&gt;&lt;P&gt;It needs to be flexible , if fiscal year , fiscal period is selected , then the sales should be calulated on the selected value. else max period of sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample model attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/154830_Capture.PNG" style="height: 319px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1284995#M851148</guid>
      <dc:creator>suvechha_b</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the between expression ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1284996#M851149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just write a flexible formula using this logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/79709"&gt;Set analysis using date range?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 09:04:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1284996#M851149</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2017-03-01T09:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the between expression ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1284997#M851150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Suvechha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer below given sample expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14883595922738099 jive_text_macro" jivemacro_uid="_14883595922738099" modifiedtitle="true"&gt;
&lt;P&gt;Sum({&amp;lt;Fiscal_Year=, Month=, DateKey = {"&amp;gt;= $(=MonthStart(Max(DateKey),-3) &amp;lt;= $(=MonthEnd(Max(DateKey),-1)"}, TranType={$(vAmountType)}&amp;gt;}Amount)&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In above expression, DateKey field is the Numeric version of Date field i.e. Floor(Date) AS DateKey in script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 09:21:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1284997#M851150</guid>
      <dc:creator>rahulpawarb</dc:creator>
      <dc:date>2017-03-01T09:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the between expression ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1284998#M851151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I think your expression is fine, just use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;period_key={"&amp;lt;=$(vSelectMaxPrev3)&amp;gt;=$(vSelectMaxPrev1)"},TranType={$(vAmountType)}&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason I say this is because if you make a selection in year or period then its going to automatically restrict this formula as your variables will reduce based on selections.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 09:31:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1284998#M851151</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2017-03-01T09:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the between expression ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1284999#M851152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its working , but if I select only Fiscal Year , it is not working. &lt;/P&gt;&lt;P&gt;If I select Fiscal Year in the filter , the model is having the max period key . So the expression should work according.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 09:53:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1284999#M851152</guid>
      <dc:creator>suvechha_b</dc:creator>
      <dc:date>2017-03-01T09:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the between expression ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1285000#M851153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Suvechha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the prompt verification. Could you please elaborate more on this? &lt;SPAN style="font-size: 13.3333px;"&gt;If possible&lt;/SPAN&gt;, Also share the updated application file,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 09:59:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1285000#M851153</guid>
      <dc:creator>rahulpawarb</dc:creator>
      <dc:date>2017-03-01T09:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the between expression ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1285001#M851154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The expression is working&amp;nbsp; when I select the [Fiscal_Year] and [Month] both or I didn't select anything in the filter.&lt;/P&gt;&lt;P&gt;But , it is not working when I only select [Fiscal_Year].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if( not GetSelectedCount([Fiscal_Year]) or&amp;nbsp; not GetSelectedCount([Month]),&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;period_key={"&amp;lt;=$(vPeriodKeyPrev)&amp;gt;=$(vMaxPrev3)"},TranType={$(vAmountType)}&amp;gt;}Amount), &lt;/P&gt;&lt;P&gt;Sum({&amp;lt;[Fiscal_Year]=,[Month]=,period_key={"&amp;lt;=$(vSelectMaxPrev3)&amp;gt;=$(vSelectMaxPrev1)"},TranType={$(vAmountType)}&amp;gt;}Amount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample model attached. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 10:15:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1285001#M851154</guid>
      <dc:creator>suvechha_b</dc:creator>
      <dc:date>2017-03-01T10:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the between expression ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1285002#M851155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried this? ^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 10:22:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1285002#M851155</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2017-03-01T10:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the between expression ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1285003#M851156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes , but its not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 10:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1285003#M851156</guid>
      <dc:creator>suvechha_b</dc:creator>
      <dc:date>2017-03-01T10:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the between expression ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1285004#M851157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to work OK for me, but in the shared application there is only one year and month so it is hard to tell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 10:32:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1285004#M851157</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2017-03-01T10:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the between expression ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1285005#M851158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Suveccha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After examining the shared expression, I found that true part of if statement requires changes in Higher Bound and Lower Bound values (Changed condition as - period_key less than equal to &lt;STRONG style="font-size: 13.3333px;"&gt;vMaxPrev3&lt;/STRONG&gt; and greater than equal to &lt;STRONG style="font-size: 13.3333px;"&gt;vPeriodKeyPrev&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14883648198439388" jivemacro_uid="_14883648198439388"&gt;
&lt;P style="font-size: 13.3333px;"&gt;if( not GetSelectedCount([Fiscal_Year]) or&amp;nbsp; not GetSelectedCount([Month]),&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;Sum({&amp;lt;[Fiscal_Year]=,[Month]=,period_key={"&lt;STRONG&gt;&amp;lt;=$(vMaxPrev3)&amp;gt;=$(vPeriodKeyPrev)&lt;/STRONG&gt;"},TranType={$(vAmountType)}&amp;gt;}Amount),&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;Sum({&amp;lt;[Fiscal_Year]=,[Month]=,period_key={"&amp;lt;=$(vSelectMaxPrev3)&amp;gt;=$(vSelectMaxPrev1)"},TranType={$(vAmountType)}&amp;gt;}Amount))&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 10:42:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-the-between-expression/m-p/1285005#M851158</guid>
      <dc:creator>rahulpawarb</dc:creator>
      <dc:date>2017-03-01T10:42:57Z</dc:date>
    </item>
  </channel>
</rss>

