<?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: replace the hardcoding formula in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524421#M438290</link>
    <description>&lt;P&gt;Soory Sunny Bhai for late reply..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PFA file.. Here the actual formula is sum(IB)/sum(TOTAL&amp;lt;MonthYear&amp;gt; {&amp;lt;cat&amp;gt;} IB)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For numerator(sum(IB)) it should be replaced by which i have done :&lt;/P&gt;&lt;P&gt;If(Sum(Consumption) &amp;lt;&amp;gt; 0,Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Aggr(&lt;/P&gt;&lt;P&gt;RangeSum(Above(Sum({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} IB), 0,&lt;/P&gt;&lt;P&gt;Month(Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Month))))&lt;/P&gt;&lt;P&gt;, cat, (MonthYear, (NUMERIC)))))&lt;/P&gt;&lt;P&gt;Now for&amp;nbsp;&lt;/P&gt;&lt;P&gt;sum(TOTAL&amp;lt;MonthYear&amp;gt; {&amp;lt;cat&amp;gt;} IB)&lt;/P&gt;&lt;P&gt;i need to put in below formula&lt;/P&gt;&lt;P&gt;If(Sum(Consumption) &amp;lt;&amp;gt; 0,Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Aggr(&lt;/P&gt;&lt;P&gt;RangeSum(Above(Sum({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} IB), 0,&lt;/P&gt;&lt;P&gt;Month(Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Month))))&lt;/P&gt;&lt;P&gt;, cat, (MonthYear, (NUMERIC)))))&lt;/P&gt;&lt;P&gt;Please let me know if you need anything more..&lt;/P&gt;</description>
    <pubDate>Thu, 27 Dec 2018 14:22:54 GMT</pubDate>
    <dc:creator>bharatkishore</dc:creator>
    <dc:date>2018-12-27T14:22:54Z</dc:date>
    <item>
      <title>replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524336#M438271</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&lt;/P&gt;&lt;P&gt;I have written the below formula :&lt;/P&gt;&lt;P&gt;If(Sum(Consumption) &amp;lt;&amp;gt; 0,Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(AddMonths(Max(MonthYear), -96)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Aggr(&lt;/P&gt;&lt;P&gt;RangeSum(Above(Sum({&amp;lt;MonthYear={"&amp;gt;=$(=Date(AddMonths(Max(MonthYear), -96)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;} Consumption), 0, Month(Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(AddMonths(Max(MonthYear), -96)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Month))))&lt;/P&gt;&lt;P&gt;, cat, (MonthYear, (NUMERIC)))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But every time i don't want to change that 96(those many months(7 years) i have). Because next month i have to change to 97 then next month 98...&lt;/P&gt;&lt;P&gt;I don't want it to be hard coding.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me how it to be automated.&lt;/P&gt;&lt;P&gt;Please let me know if you need anything more.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bharat&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 12:05:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524336#M438271</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-27T12:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524337#M438272</link>
      <description>&lt;P&gt;So it seems that the lower limit is fixed at a certain date? Will it always be fixed there? meaning with each passing month you will keep on increasing the number? 96, 97, 98, .... 110, ...., 120, ....150... etc? or does it every reset?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 12:08:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524337#M438272</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-27T12:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524343#M438273</link>
      <description>Thank you sunny bhai for reply.&lt;BR /&gt;yes sunny bhai. because i am trying to calculate YTD and this is a monthly refresh.&lt;BR /&gt;Since i have 7 years i.e. 96 months i am giving 96 then again next month i will do a refresh then the number will be 97 and the next month it will be 98..</description>
      <pubDate>Thu, 27 Dec 2018 12:15:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524343#M438273</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-27T12:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524350#M438274</link>
      <description>&lt;P&gt;But next year will the number is 96 + 12 = 108 and then then year after it will be 96 + 24 = 120?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 12:23:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524350#M438274</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-27T12:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524353#M438275</link>
      <description>No Sunny Bhai, it will be 96+1 =97 for jan and for feb it will 97+1=98... because it is a monthly refresh.&lt;BR /&gt;please let me know if something is not clear..</description>
      <pubDate>Thu, 27 Dec 2018 12:27:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524353#M438275</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-27T12:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524354#M438276</link>
      <description>&lt;P&gt;Right but what will happen a year from now&lt;/P&gt;&lt;P&gt;Jan2019 - 97&lt;/P&gt;&lt;P&gt;Feb2019 - 98&lt;/P&gt;&lt;P&gt;Mar2019 - 99&lt;/P&gt;&lt;P&gt;Apr2019 - 100&lt;/P&gt;&lt;P&gt;May2019 - 101&lt;/P&gt;&lt;P&gt;Jun2019 - 102&lt;/P&gt;&lt;P&gt;July2019 - 103&lt;/P&gt;&lt;P&gt;Aug2019 - 104&lt;/P&gt;&lt;P&gt;Sep2019 - 105&lt;/P&gt;&lt;P&gt;Oct2019 - 106&lt;/P&gt;&lt;P&gt;Nov2019 - 107&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Dec2019 - 108 or 96?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Jan2020 - 109 or 97?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Does my question may sense?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 12:30:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524354#M438276</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-27T12:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524356#M438277</link>
      <description>Jan 2020 will be 109 and feb 2020 will be 110 and so on...&lt;BR /&gt;Since i need to do YTD the formula what i have written is :&lt;BR /&gt;Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(AddMonths(Max(MonthYear), -96))&lt;BR /&gt;96 is the number of months i have. Since i have data from jan 2012 to dec 2018 it is 96 months.&lt;BR /&gt;So i have given hardcoding which i don't want to do everymonth.&lt;BR /&gt;Please let me know if anything is not clear Sunny bhai..</description>
      <pubDate>Thu, 27 Dec 2018 12:40:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524356#M438277</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-27T12:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524360#M438278</link>
      <description>&lt;P&gt;If that is the case... then why don't you just use this&lt;/P&gt;&lt;PRE&gt;MonthYear = {"&amp;gt;=$(=Date(MakeDate(2012)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;}&lt;/PRE&gt;&lt;P&gt;Because the beginning will always be Jan 2012... then why do you even need to do -96, -97,... and so on?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 12:43:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524360#M438278</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-27T12:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524364#M438280</link>
      <description>Thank you Sunny Bhai.. it worked perfectly...One final question&lt;BR /&gt;for Date(MakeDate(2012))) is it is possible to give some min(MonthYear).. can we do anything like that..</description>
      <pubDate>Thu, 27 Dec 2018 12:57:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524364#M438280</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-27T12:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524365#M438281</link>
      <description>&lt;P&gt;I think so... may be just &lt;FONT color="#FF0000"&gt;Min({1} MonthYear)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 12:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524365#M438281</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-27T12:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524366#M438282</link>
      <description>Or just Min(MonthYear)... not entirely sure what you have and trying to do... so just guessing &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 27 Dec 2018 12:59:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524366#M438282</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-27T12:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524370#M438283</link>
      <description>Thank you Sunny Bhai.. this also worked. I have replaced like below:&lt;BR /&gt;&lt;BR /&gt;If(Sum(Consumption) &amp;lt;&amp;gt; 0,Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Aggr(&lt;BR /&gt;&lt;BR /&gt;RangeSum(Above(Sum({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Consumption), 0,&lt;BR /&gt;&lt;BR /&gt;Month(Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Month))))&lt;BR /&gt;&lt;BR /&gt;, (MonthYear, (NUMERIC)))))&lt;BR /&gt;&lt;BR /&gt;The values are fine.. please let me know if i am doing anything wrong in the formula..&lt;BR /&gt;&lt;BR /&gt;Thank you again Sunny Bhai..</description>
      <pubDate>Thu, 27 Dec 2018 13:06:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524370#M438283</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-27T13:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524372#M438284</link>
      <description>&lt;P&gt;I might be wrong. but may be you just need this&lt;/P&gt;&lt;PRE&gt;Aggr(RangeSum(Above(Sum({&amp;lt;MonthYear&amp;gt;} Consumption), 0, Month(Only({&amp;lt;MonthYear&amp;gt;} Month)))), (MonthYear, (NUMERIC)))&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Dec 2018 13:11:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524372#M438284</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-27T13:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524376#M438285</link>
      <description>No Sunny Bhai it didn't work.. but when i have replaced with your earlier suggestions everything worked perfectly....&lt;BR /&gt;&lt;BR /&gt;One final help Sunny Bhai... i have the below formula :&lt;BR /&gt;&lt;BR /&gt;sum(IB)/sum(TOTAL&amp;lt;[Month-Year]&amp;gt; {&amp;lt;cat&amp;gt;} IB)&lt;BR /&gt;&lt;BR /&gt;Numerator i have replaced i.e.&lt;BR /&gt;&lt;BR /&gt;If(Sum(Consumption) &amp;lt;&amp;gt; 0,Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Aggr(&lt;BR /&gt;RangeSum(Above(Sum({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} IB), 0,&lt;BR /&gt;Month(Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Month))))&lt;BR /&gt;, cat, (MonthYear, (NUMERIC)))))&lt;BR /&gt;&lt;BR /&gt;Now i need your help to replace the denominator i.e. sum(TOTAL&amp;lt;[Month-Year]&amp;gt; {&amp;lt;cat&amp;gt;} IB)&lt;BR /&gt;&lt;BR /&gt;Can you please help me how to replace the denominator..</description>
      <pubDate>Thu, 27 Dec 2018 13:19:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524376#M438285</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-27T13:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524380#M438286</link>
      <description>&lt;P&gt;Sure, what do you want to replace it with?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 13:23:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524380#M438286</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-27T13:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524381#M438287</link>
      <description>I need to replace this sum(TOTAL&amp;lt;[Month-Year]&amp;gt; {&amp;lt;cat&amp;gt;} IB) in the below one:&lt;BR /&gt;&lt;BR /&gt;If(Sum(Consumption) &amp;lt;&amp;gt; 0,Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Aggr(&lt;BR /&gt;RangeSum(Above(Sum({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} IB), 0,&lt;BR /&gt;Month(Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Month))))&lt;BR /&gt;, cat, (MonthYear, (NUMERIC)))))</description>
      <pubDate>Thu, 27 Dec 2018 13:25:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524381#M438287</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-27T13:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524386#M438288</link>
      <description>I am not sure what that means. Would you be able to share a sample and the output you expect to see from it?</description>
      <pubDate>Thu, 27 Dec 2018 13:29:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524386#M438288</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-27T13:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524421#M438290</link>
      <description>&lt;P&gt;Soory Sunny Bhai for late reply..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PFA file.. Here the actual formula is sum(IB)/sum(TOTAL&amp;lt;MonthYear&amp;gt; {&amp;lt;cat&amp;gt;} IB)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For numerator(sum(IB)) it should be replaced by which i have done :&lt;/P&gt;&lt;P&gt;If(Sum(Consumption) &amp;lt;&amp;gt; 0,Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Aggr(&lt;/P&gt;&lt;P&gt;RangeSum(Above(Sum({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} IB), 0,&lt;/P&gt;&lt;P&gt;Month(Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Month))))&lt;/P&gt;&lt;P&gt;, cat, (MonthYear, (NUMERIC)))))&lt;/P&gt;&lt;P&gt;Now for&amp;nbsp;&lt;/P&gt;&lt;P&gt;sum(TOTAL&amp;lt;MonthYear&amp;gt; {&amp;lt;cat&amp;gt;} IB)&lt;/P&gt;&lt;P&gt;i need to put in below formula&lt;/P&gt;&lt;P&gt;If(Sum(Consumption) &amp;lt;&amp;gt; 0,Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Aggr(&lt;/P&gt;&lt;P&gt;RangeSum(Above(Sum({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} IB), 0,&lt;/P&gt;&lt;P&gt;Month(Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Month))))&lt;/P&gt;&lt;P&gt;, cat, (MonthYear, (NUMERIC)))))&lt;/P&gt;&lt;P&gt;Please let me know if you need anything more..&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 14:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524421#M438290</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-27T14:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524423#M438292</link>
      <description>&lt;P&gt;Soory Sunny Bhai for late reply..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PFA file.. Here the actual formula is sum(IB)/sum(TOTAL&amp;lt;MonthYear&amp;gt; {&amp;lt;cat&amp;gt;} IB)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For numerator(sum(IB)) it should be replaced by which i have done :&lt;/P&gt;&lt;P&gt;If(Sum(Consumption) &amp;lt;&amp;gt; 0,Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Aggr(&lt;/P&gt;&lt;P&gt;RangeSum(Above(Sum({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} IB), 0,&lt;/P&gt;&lt;P&gt;Month(Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Month))))&lt;/P&gt;&lt;P&gt;, cat, (MonthYear, (NUMERIC)))))&lt;/P&gt;&lt;P&gt;Now for&amp;nbsp;&lt;/P&gt;&lt;P&gt;sum(TOTAL&amp;lt;MonthYear&amp;gt; {&amp;lt;cat&amp;gt;} IB)&lt;/P&gt;&lt;P&gt;i need to put in below formula&lt;/P&gt;&lt;P&gt;If(Sum(Consumption) &amp;lt;&amp;gt; 0,Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Aggr(&lt;/P&gt;&lt;P&gt;RangeSum(Above(Sum({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} IB), 0,&lt;/P&gt;&lt;P&gt;Month(Only({&amp;lt;MonthYear={"&amp;gt;=$(=Date(Min(MonthYear)))&amp;lt;=$(=Date(Max(MonthYear)))"}&amp;gt;} Month))))&lt;/P&gt;&lt;P&gt;, cat, (MonthYear, (NUMERIC)))))&lt;/P&gt;&lt;P&gt;Please let me know if you need anything more..&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 14:23:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524423#M438292</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-27T14:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: replace the hardcoding formula</title>
      <link>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524429#M438293</link>
      <description>&lt;P&gt;Something is not right... why are we seeing the chart go up and down... is this chart showing correctly?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/2697i82A3B37FD27D50CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;Shouldn't we be seeing a chart where each bar should be higher than the previous month's bar?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 14:33:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/replace-the-hardcoding-formula/m-p/1524429#M438293</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-27T14:33:13Z</dc:date>
    </item>
  </channel>
</rss>

