<?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 sum in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225565#M77855</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are many ways to skin the metaphorical cat depending on what result you want. Here's one that should work:&lt;/P&gt;&lt;P&gt;T1:&lt;BR /&gt;LOAD ID,&lt;BR /&gt; Category,&lt;BR /&gt; [Start Date],&lt;BR /&gt; [End Date],&lt;BR /&gt; [Start Date] &amp;amp; [End Date] as DateDiff,&lt;BR /&gt; Amount&lt;BR /&gt;FROM&lt;BR /&gt;BaseData.xls (biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;P&gt;join&lt;BR /&gt;Load&lt;BR /&gt; ID,&lt;BR /&gt; DateDiff,&lt;BR /&gt; sum(Amount) as SumOfAmount&lt;BR /&gt;resident T1&lt;BR /&gt;group by ID, DateDiff;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Oct 2009 13:56:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-10-27T13:56:30Z</dc:date>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225564#M77854</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;i have data like the following:&lt;/P&gt;&lt;P&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt; &lt;w:WordDocument&gt;  &lt;w:View&gt;Normal&lt;/w:View&gt;  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;  &lt;w:TrackMoves&gt;&lt;/w:TrackMoves&gt;  &lt;w:TrackFormatting&gt;&lt;/w:TrackFormatting&gt;  &lt;w:PunctuationKerning&gt;&lt;/w:PunctuationKerning&gt;  &lt;w:ValidateAgainstSchemas&gt;&lt;/w:ValidateAgainstSchemas&gt;  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;  &lt;w:DoNotPromoteQF&gt;&lt;/w:DoNotPromoteQF&gt;  &lt;w:LidThemeOther&gt;EN-US&lt;/w:LidThemeOther&gt;  &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;  &lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;  &lt;w:Compatibility&gt;   &lt;w:BreakWrappedTables&gt;&lt;/w:BreakWrappedTables&gt;   &lt;w:SnapToGridInCell&gt;&lt;/w:SnapToGridInCell&gt;   &lt;w:WrapTextWithPunct&gt;&lt;/w:WrapTextWithPunct&gt;   &lt;w:UseAsianBreakRules&gt;&lt;/w:UseAsianBreakRules&gt;   &lt;w:DontGrowAutofit&gt;&lt;/w:DontGrowAutofit&gt;   &lt;w:SplitPgBreakAndParaMark&gt;&lt;/w:SplitPgBreakAndParaMark&gt;   &lt;w:DontVertAlignCellWithSp&gt;&lt;/w:DontVertAlignCellWithSp&gt;   &lt;w:DontBreakConstrainedForcedTables&gt;&lt;/w:DontBreakConstrainedForcedTables&gt;   &lt;w:DontVertAlignInTxbx&gt;&lt;/w:DontVertAlignInTxbx&gt;   &lt;w:Word11KerningPairs&gt;&lt;/w:Word11KerningPairs&gt;   &lt;w:CachedColBalance&gt;&lt;/w:CachedColBalance&gt;  &lt;/w:Compatibility&gt;  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;m:mathPr&gt;   &lt;m:mathFont m:val="Cambria Math"&gt;&lt;/m:mathFont&gt;   &lt;m:brkBin m:val="before"&gt;&lt;/m:brkBin&gt;   &lt;m:brkBinSub m:val=" "&gt;&lt;/m:brkBinSub&gt;   &lt;m:smallFrac m:val="off"&gt;&lt;/m:smallFrac&gt;   &lt;m:dispDef&gt;&lt;/m:dispDef&gt;   &lt;m:lMargin m:val="0"&gt;&lt;/m:lMargin&gt;   &lt;m:rMargin m:val="0"&gt;&lt;/m:rMargin&gt;   &lt;m:defJc m:val="centerGroup"&gt;&lt;/m:defJc&gt;   &lt;m:wrapIndent m:val="1440"&gt;&lt;/m:wrapIndent&gt;   &lt;m:intLim m:val="subSup"&gt;&lt;/m:intLim&gt;   &lt;m:naryLim m:val="undOvr"&gt;&lt;/m:naryLim&gt;  &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt; &lt;w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"  DefSemiHidden="true" DefQFormat="false" DefPriority="99"  LatentStyleCount="267"&gt;  &lt;w:LsdException Locked="false" Priority="0" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="Normal"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="9" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="heading 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="39" Name="toc 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="39" Name="toc 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="39" Name="toc 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="39" Name="toc 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="39" Name="toc 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="39" Name="toc 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="39" Name="toc 7"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="39" Name="toc 8"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="39" Name="toc 9"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="10" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="Title"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="11" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="Subtitle"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="22" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="Strong"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="20" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="Emphasis"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="59" SemiHidden="false"   UnhideWhenUsed="false" Name="Table Grid"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="No Spacing"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Shading"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"   UnhideWhenUsed="false" Name="Light List"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Grid"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"   UnhideWhenUsed="false" Name="Dark List"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Shading"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful List"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Grid"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Shading Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"   UnhideWhenUsed="false" Name="Light List Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Grid Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 1 Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="34" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="29" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="Quote"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="30" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 2 Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"   UnhideWhenUsed="false" Name="Dark List Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Shading Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful List Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Grid Accent 1"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Shading Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"   UnhideWhenUsed="false" Name="Light List Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Grid Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 1 Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 2 Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"   UnhideWhenUsed="false" Name="Dark List Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Shading Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful List Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Grid Accent 2"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Shading Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"   UnhideWhenUsed="false" Name="Light List Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Grid Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 1 Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 2 Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"   UnhideWhenUsed="false" Name="Dark List Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Shading Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful List Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Grid Accent 3"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Shading Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"   UnhideWhenUsed="false" Name="Light List Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Grid Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 1 Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 2 Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"   UnhideWhenUsed="false" Name="Dark List Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Shading Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful List Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Grid Accent 4"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Shading Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"   UnhideWhenUsed="false" Name="Light List Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Grid Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 1 Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 2 Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"   UnhideWhenUsed="false" Name="Dark List Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Shading Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful List Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Grid Accent 5"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Shading Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"   UnhideWhenUsed="false" Name="Light List Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"   UnhideWhenUsed="false" Name="Light Grid Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 1 Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium List 2 Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"   UnhideWhenUsed="false" Name="Dark List Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Shading Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful List Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"   UnhideWhenUsed="false" Name="Colorful Grid Accent 6"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="19" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="21" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="31" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="32" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="33" SemiHidden="false"   UnhideWhenUsed="false" QFormat="true" Name="Book Title"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="37" Name="Bibliography"&gt;&lt;/w:LsdException&gt;  &lt;w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"&gt;&lt;/w:LsdException&gt; &lt;/w:LatentStyles&gt;&lt;/xml&gt;&lt;![endif]--&gt; &lt;!--[if gte mso 10]&gt;&lt;mce:style&gt;&lt;!  /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}table.MsoTableGrid {mso-style-name:"Table Grid"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-priority:59; mso-style-unhide:no; border:solid black 1.0pt; mso-border-themecolor:text1; mso-border-alt:solid black .5pt; mso-border-themecolor:text1; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.5pt solid black; mso-border-insideh-themecolor:text1; mso-border-insidev:.5pt solid black; mso-border-insidev-themecolor:text1; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}--&gt;&lt;!--[endif]--&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border: medium none ; border-collapse: collapse;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: 1pt solid black; padding: 0in 5.4pt; width: 92.75pt;" valign="top" width="124"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;ID&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 95.05pt;" valign="top" width="127"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;Category&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.35pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;Start Date&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.2pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;End Date&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 90.45pt;" valign="top" width="121"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;Amount&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 0in 5.4pt; width: 92.75pt;" valign="top" width="124"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 95.05pt;" valign="top" width="127"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.35pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;7-May-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.2pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;31-May-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 90.45pt;" valign="top" width="121"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;$100&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 0in 5.4pt; width: 92.75pt;" valign="top" width="124"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 95.05pt;" valign="top" width="127"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.35pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;1-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.2pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;6-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 90.45pt;" valign="top" width="121"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;$85&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 0in 5.4pt; width: 92.75pt;" valign="top" width="124"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 95.05pt;" valign="top" width="127"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.35pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;7-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.2pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;6-May-2008&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 90.45pt;" valign="top" width="121"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;$50&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 0in 5.4pt; width: 92.75pt;" valign="top" width="124"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 95.05pt;" valign="top" width="127"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.35pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;7-May-2008&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.2pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;6-May-2009&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 90.45pt;" valign="top" width="121"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;$70&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 0in 5.4pt; width: 92.75pt;" valign="top" width="124"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 95.05pt;" valign="top" width="127"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.35pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;7-May-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.2pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;31-May-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 90.45pt;" valign="top" width="121"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;$20&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 0in 5.4pt; width: 92.75pt;" valign="top" width="124"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 95.05pt;" valign="top" width="127"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.35pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;1-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.2pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;6-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 90.45pt;" valign="top" width="121"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;$12&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 0in 5.4pt; width: 92.75pt;" valign="top" width="124"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 95.05pt;" valign="top" width="127"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.35pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;7-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.2pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;6-May-2009&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 90.45pt;" valign="top" width="121"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;$15&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 0in 5.4pt; width: 92.75pt;" valign="top" width="124"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 95.05pt;" valign="top" width="127"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.35pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;1-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.2pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;6-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 90.45pt;" valign="top" width="121"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;$5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 0in 5.4pt; width: 92.75pt;" valign="top" width="124"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 95.05pt;" valign="top" width="127"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.35pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;7-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 100.2pt;" valign="top" width="134"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;6-May-2009&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 0in 5.4pt; width: 90.45pt;" valign="top" width="121"&gt;&lt;P style="margin-bottom: 0.0001pt; line-height: normal;"&gt;$5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to achieve the following result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD valign="top" width="79"&gt;&lt;P&gt;ID&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="126"&gt;&lt;P&gt;Start Date&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="108"&gt;&lt;P&gt;End Date&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="192"&gt;&lt;P&gt;Amount&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="79"&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="126"&gt;&lt;P&gt;7-May-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="108"&gt;&lt;P&gt;31-May-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="192"&gt;&lt;P&gt;$100 + $20= $120&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="79"&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="126"&gt;&lt;P&gt;1-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="108"&gt;&lt;P&gt;6-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="192"&gt;&lt;P&gt;$85 + $12 + $5= $102&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="79"&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="126"&gt;&lt;P&gt;7-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="108"&gt;&lt;P&gt;6-May-2008&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="192"&gt;&lt;P&gt;$50 + $15 + $5 = $70&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="79"&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="126"&gt;&lt;P&gt;7-May-2008&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="108"&gt;&lt;P&gt;6-May-2009&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="192"&gt;&lt;P&gt;$70 + $15 + $5 = $90&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;As the start and end date are not entirely similar among the category, i can't directly do a group by.&lt;/P&gt;&lt;P&gt;The way i thought of is by looping it by day but it'll be slow.&lt;/P&gt;&lt;P&gt;Any idea is highly appreciated. Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 11:44:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225564#M77854</guid>
      <dc:creator />
      <dc:date>2009-10-27T11:44:58Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225565#M77855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are many ways to skin the metaphorical cat depending on what result you want. Here's one that should work:&lt;/P&gt;&lt;P&gt;T1:&lt;BR /&gt;LOAD ID,&lt;BR /&gt; Category,&lt;BR /&gt; [Start Date],&lt;BR /&gt; [End Date],&lt;BR /&gt; [Start Date] &amp;amp; [End Date] as DateDiff,&lt;BR /&gt; Amount&lt;BR /&gt;FROM&lt;BR /&gt;BaseData.xls (biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;P&gt;join&lt;BR /&gt;Load&lt;BR /&gt; ID,&lt;BR /&gt; DateDiff,&lt;BR /&gt; sum(Amount) as SumOfAmount&lt;BR /&gt;resident T1&lt;BR /&gt;group by ID, DateDiff;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 13:56:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225565#M77855</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-27T13:56:30Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225566#M77856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johannes,&lt;/P&gt;&lt;P&gt;Thanks for the swift reply. However, I'm not able to get the result using your script.&lt;/P&gt;&lt;P&gt;Start date and end date are not same for all category, grouping them will not sum as per the period.&lt;/P&gt;&lt;P&gt;Mind attaching your qvw file? Thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 16:32:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225566#M77856</guid>
      <dc:creator />
      <dc:date>2009-10-27T16:32:01Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225567#M77857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you group only by StartDate?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 16:35:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225567#M77857</guid>
      <dc:creator>mongolu</dc:creator>
      <dc:date>2009-10-27T16:35:03Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225568#M77858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I frankly don't understand what your groupings ARE. On first glance, you appear to be grouping by ID, Start Date and End Date. But you aren't.&lt;/P&gt;&lt;P&gt;The first line makes sense. Both the $100 and $20 entry have that start and end date, and no other entries do.&lt;/P&gt;&lt;P&gt;The second line makes sense. The $85, $12 and first $5 entry have that start and end date, and no other entries do.&lt;/P&gt;&lt;P&gt;The third line confuses me. Only the $50 entry has the given start and end date. The $15 and one of the $5 entries starts on the same day, but ends a year after the given end date. So why are they on that line? Because they have the same start date? Because they have the same start date AND end exactly one year after the end date? Something else?&lt;/P&gt;&lt;P&gt;The fourth line also confuses me. Only the $70 entry has the given start and end date. The $15 entry is REPEATED on this line. It does have the same end date, but a different start date. And we also have a $5 entry that ends on that date, even though it starts on a different date.&lt;/P&gt;&lt;P&gt;So on second viewing, it appears that if EITHER date matches, we include the amount. But that's not it either, because that would produce THIS chart:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Start Date End Date Amount&lt;BR /&gt;7-May-2007 31-May-2007 $100 + $20 = $120&lt;BR /&gt;1-Jun-2007 6-Jun-2007 $85 + $12 + $5 = $102&lt;BR /&gt;7-Jun-2007 6-May-2008 $50 + $15 + $5 = $70&lt;BR /&gt;7-May-2008 6-May-2009 $70 + $15 + $5 = $90&lt;BR /&gt;&lt;STRONG&gt;7-Jun-2007 6-May-2009 $70 + $50 + $15 + $5 = $140&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So for some reason, you're excluding the last line of that chart. Do you only use the start date and the end date from the category 1 entries? That's one difference between the last line and the others.&lt;/P&gt;&lt;P&gt;Anyway, either I'm missing something totally obvious that everyone else is seeing, or you seriously need to explain how you're producing your chart, because I'm just not seeing it. Unless the rule really IS "I want to see only the category 1 start and end dates, and then I want to sum up the amounts for anything in any category that has either the same start date OR the same end date." And if that's the rule, it certainly wasn't obvious.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 02:52:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225568#M77858</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-28T02:52:34Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225569#M77859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;Thanks for taking your time interpretting my question. So sorry that my question wasn't clear enough.&lt;/P&gt;&lt;P&gt;Hope i'll do a better job this time.&lt;/P&gt;&lt;P&gt;Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border:medium none;border-collapse:collapse;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border:1pt solid black;padding:0in 5.4pt;width:81.3pt;" valign="top" width="108"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Tenant&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:1pt 1pt 1pt medium solid solid solid none black black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Category&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:1pt 1pt 1pt medium solid solid solid none black black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Category Desc&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.65pt;border:1pt 1pt 1pt medium solid solid solid none black black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Start Date&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.6pt;border:1pt 1pt 1pt medium solid solid solid none black black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;End Date&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:72.95pt;border:1pt 1pt 1pt medium solid solid solid none black black black -moz-use-text-color;" valign="top" width="97"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Amount&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding:0in 5.4pt;width:81.3pt;border:medium 1pt 1pt none solid solid -moz-use-text-color black black;" valign="top" width="108"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;GAP&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Base Rent&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;7-May-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.6pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;31-May-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:72.95pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="97"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;$100&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding:0in 5.4pt;width:81.3pt;border:medium 1pt 1pt none solid solid -moz-use-text-color black black;" valign="top" width="108"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;GAP&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Base Rent&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;1-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.6pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;6-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:72.95pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="97"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;$85&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding:0in 5.4pt;width:81.3pt;border:medium 1pt 1pt none solid solid -moz-use-text-color black black;" valign="top" width="108"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;GAP&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Base Rent&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;7-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.6pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;6-May-2008&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:72.95pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="97"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;$50&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding:0in 5.4pt;width:81.3pt;border:medium 1pt 1pt none solid solid -moz-use-text-color black black;" valign="top" width="108"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;GAP&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Base Rent&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;7-May-2008&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.6pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;6-May-2009&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:72.95pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="97"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;$70&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding:0in 5.4pt;width:81.3pt;border:medium 1pt 1pt none solid solid -moz-use-text-color black black;" valign="top" width="108"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;GAP&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Service Chg&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;7-May-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.6pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;31-May-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:72.95pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="97"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;$20&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding:0in 5.4pt;width:81.3pt;border:medium 1pt 1pt none solid solid -moz-use-text-color black black;" valign="top" width="108"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;GAP&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Service Chg&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;1-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.6pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;6-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:72.95pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="97"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;$12&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding:0in 5.4pt;width:81.3pt;border:medium 1pt 1pt none solid solid -moz-use-text-color black black;" valign="top" width="108"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;GAP&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Service Chg&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;7-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.6pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;6-May-2009&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:72.95pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="97"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;$15&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding:0in 5.4pt;width:81.3pt;border:medium 1pt 1pt none solid solid -moz-use-text-color black black;" valign="top" width="108"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;GAP&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Misc Chg&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;1-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.6pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;6-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:72.95pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="97"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;$5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding:0in 5.4pt;width:81.3pt;border:medium 1pt 1pt none solid solid -moz-use-text-color black black;" valign="top" width="108"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;GAP&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:83.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="112"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Misc Chg&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.65pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;7-Jun-2007&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:78.6pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="105"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;6-May-2009&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding:0in 5.4pt;width:72.95pt;border:medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" valign="top" width="97"&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;$5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;My purpose is to calculate staggered gross rent i.e. Base Rent + Service Chg + Misc Chg. Staggered which means if there is a change in the rental during the period. I will also need the date information for e.g. as below:&lt;/P&gt;&lt;P&gt;Tenant GAP will pay rental of&lt;/P&gt;&lt;P&gt;$120 from 7-May-2007 until 31-May-2007;&lt;/P&gt;&lt;P&gt;$102 from 1-Jun-2007 until 6-Jun-2007;&lt;/P&gt;&lt;P&gt;$70 from 7-Jun-2007 until 6-May-2008;&lt;/P&gt;&lt;P&gt;$90 from 7-May-2008 until 6-May-2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this explains it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 08:02:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225569#M77859</guid>
      <dc:creator />
      <dc:date>2009-10-28T08:02:08Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225570#M77860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, so from 7-May-2007 to 31-May-2007, we charge the base rent of $100 plus the service charge of $20.&lt;/P&gt;&lt;P&gt;From 1-Jun-2007 to 6-Jun-2007, we charge the base rent of $85, plus a service charge of $12, plus a misc charge of $5.&lt;/P&gt;&lt;P&gt;From 7-Jun-2007 through 6-May-2008, we charge the base rent of $50. For the service charge of $15 from 7-Jun-2007 through 6-May-2009, this means that we should charge $15 for every base rent period within the service charge period? So the 7-Jun-2007 through 6-May-2008 period gets charged a full $15? Same rule for the $5 misc charge fro 7-Jun-2007 through 6-May-2009? So we charge $50 + $15 + $5 for $70 total.&lt;/P&gt;&lt;P&gt;For 7-May-2008 through 6-May-2009, we charge the base rent of $70. Following the rule above, we also charge the $15 service charge and the $5 misc charge AGAIN based on their 7-Jun-2007 through 6-May-2009 periods, for a total of $90.&lt;/P&gt;&lt;P&gt;So is that the rule? Everything is based on the Base Rent periods, all other categories of charges will have periods that are ALWAYS composed of one or more COMPLETE AND CONTIGUOUS Base Rent periods, and the amount shown should be charged to ALL of the Base Rent periods inside of the other category's period?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 22:37:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225570#M77860</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-28T22:37:48Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225571#M77861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, John. Spot on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2009 07:52:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225571#M77861</guid>
      <dc:creator />
      <dc:date>2009-10-29T07:52:29Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225572#M77862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK! &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt; Now to actually work on a solution. I'll try to get to this soon. Does the answer need to be a script solution, or is a chart expression that does the same thing (if that ends up being easier) OK?&lt;/P&gt;&lt;P&gt;(Edit: I haven't forgotten this. Just didn't get to work on it today other than some thoughts on how I want the data model to look. Specifically, that I want to break the other categories apart by the base category's date ranges so that the expression can then be a simple sum. I just need to work out the best way to do that. Or maybe I'll have some other thought on how to approach it.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2009 22:30:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225572#M77862</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-29T22:30:53Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225573#M77863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I followed my thought yesterday to break the other categories apart by the base rental periods, and then just sum(Amount). It just turned out to be harder and more complicated than I was expecting. Maybe there's a better way, but see attached for one way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Oct 2009 02:52:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225573#M77863</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-31T02:52:43Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225574#M77864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;load id , start Date , min ( End date ) , sum ( Amount )&lt;/P&gt;&lt;P&gt;from table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Oct 2009 03:00:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225574#M77864</guid>
      <dc:creator />
      <dc:date>2009-10-31T03:00:08Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225575#M77865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Ivanildo Buarque wrote:load id , start Date , min ( End date ) , sum ( Amount )&lt;BR /&gt;from table&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You mean this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[Charges]:&lt;BR /&gt;LOAD&lt;BR /&gt; "Tenant"&lt;BR /&gt;,"Start Date"&lt;BR /&gt;,min("End Date") as "End Date"&lt;BR /&gt;,sum("Amount") as "Amount"&lt;BR /&gt;RESIDENT [Raw Data]&lt;BR /&gt;GROUP BY&lt;BR /&gt; "Tenant"&lt;BR /&gt;,"Start Date"&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;That doesn't work because some of the service and miscellaneous charges are supposed to apply to more than one base rental period. This approach only applies them to the first base rental period.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Oct 2009 03:44:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225575#M77865</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-31T03:44:48Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225576#M77866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot, John!&lt;/P&gt;&lt;P&gt;i was creating a table for each category and join them together but was having issue with null.&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 14:10:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225576#M77866</guid>
      <dc:creator />
      <dc:date>2009-11-03T14:10:25Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225577#M77867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey John,&lt;/P&gt;&lt;P&gt;i just read your explanation on the rounding function. what would you expect to get after rounding 12345.555 to 2 decimals point in QV?&lt;/P&gt;&lt;P&gt;if my script is :&lt;/P&gt;&lt;P&gt;load round(12345.555, 0.01) as rd autogenerate 1;&lt;/P&gt;&lt;P&gt;i'll get 12345.55&lt;/P&gt;&lt;P&gt;if my script is:&lt;/P&gt;&lt;P&gt;Z:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[A,B&lt;BR /&gt;12345.555,211.3213123];&lt;BR /&gt;&lt;BR /&gt;LOAD&lt;BR /&gt;round(A,0.01) as A,&lt;BR /&gt;num(B, '#,##0.00') as B,&lt;BR /&gt;A as OriA,&lt;BR /&gt;B as OriB&lt;BR /&gt;Resident Z;&lt;BR /&gt;&lt;BR /&gt;drop table Z;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'll get 12345.56.&lt;/P&gt;&lt;P&gt;putting =round(12345.555, 0.01) on text object will return me 12345.55 as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 15:22:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225577#M77867</guid>
      <dc:creator />
      <dc:date>2009-11-03T15:22:04Z</dc:date>
    </item>
    <item>
      <title>sum in script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225578#M77868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to QlikView's documentation, you should get 12345.56, but the documentation doesn't always match reality due to the limitations of binary floating point for representing decimal numbers.&lt;/P&gt;&lt;P&gt;One possible explanation (for which I have almost no evidence) would be if QlikView uses more than one numeric format internally. My understanding was that it was using IEEE double precision binary floating point for all numbers, but Rob Wunderlich's memory usage analysis indicated that shorter numbers took less memory, perhaps indicating a second numeric format. Perhaps the second format is IEEE single precision binary floating point. That allows for 24 binary digits, which in general can only store seven decimal digits, but your eight-digit number can technically squeeze in since it is small. So my theory is that when you use 12345.555 individually in a table or text box, it gets represented with single-precision, but when you combine it in a table with 211.3213123, that has enough digits to require double-precision for the column, resulting internally in a slightly-different approximation, one which rounds up instead of down.&lt;/P&gt;&lt;P&gt;It should be easy to gather some evidence for or against this theory. I need to leave this open in a tab and do that later today.&lt;/P&gt;&lt;P&gt;Edit: Well, that theory's already out the window. I see that you put them in separate columns instead of rows, which should give QlikView the ability to use different formats for each number. I'll need to think of another theory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 00:33:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script/m-p/225578#M77868</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-11-04T00:33:49Z</dc:date>
    </item>
  </channel>
</rss>

