<?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: Problem with calculating expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843011#M469842</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Len(Trim(Sum)) = 0, Peek('Sum1'), Sum) as Sum1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;*&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Test.xlsx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output in Table Box:&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/89767_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jun 2015 13:39:26 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-06-17T13:39:26Z</dc:date>
    <item>
      <title>Problem with calculating expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843008#M469839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some problem with correct calculating expression in my model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have pivot table, where i calculate expression result by dimension YearMonth as:&lt;/P&gt;&lt;P&gt;=sum(Quantity*Sum)&lt;/P&gt;&lt;P&gt;There is Quantity in every YearMonth, but not Sum.&lt;/P&gt;&lt;P&gt;What i need: If there no sum for some YearMonth, get it from nearest previous YearMonth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In YearMonth 201505 there no sum, that's why in this row i need get neares sum from YearMonth 201504 = 22*4=88&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;In YearMonth 201506 there no sum, that's why in this row i need get neares sum from YearMonth 201504 = 12*4=48&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;There're model and source file for my task.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Please, help to solve this problem.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 13:08:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843008#M469839</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-17T13:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculating expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843009#M469840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you need a solution on the front end or script solution also works?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 13:31:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843009#M469840</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-17T13:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculating expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843010#M469841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Script solution also works &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 13:34:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843010#M469841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-17T13:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculating expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843011#M469842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Len(Trim(Sum)) = 0, Peek('Sum1'), Sum) as Sum1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;*&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Test.xlsx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output in Table Box:&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/89767_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 13:39:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843011#M469842</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-17T13:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculating expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843012#M469843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect!&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;P&gt;Tell me please, will this calculation aggregate by id? (this is test variant of task, there will be more values....)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 13:50:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843012#M469843</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-17T13:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculating expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843013#M469844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure I understand your question??? This will populate missing value for whereever there is a missing sum. The only thing I would add is to order it (in a resident table instead of preceding load) correctly when you have more data . may be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LOAD &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;*&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Test.xlsx&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Table1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; If(Len(Trim(Sum)) = 0, Peek('Sum1'), Sum) as Sum1&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Order By Id, YearMonth;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Drop Table Table;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 14:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-calculating-expression/m-p/843013#M469844</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-17T14:02:30Z</dc:date>
    </item>
  </channel>
</rss>

