<?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: Creating Trial Balance by Account and Period in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612287#M682038</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nicole, You should have the use Group By clause if you are using any Aggregation function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Aug 2014 17:12:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-08-04T17:12:59Z</dc:date>
    <item>
      <title>Creating Trial Balance by Account and Period</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612282#M682033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to create a trial balance (from Microsoft Dynamics GP), which shows the opening balance, debits, credits, net activity, and ending balance by account by period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;Ultimately, I need the structure to look like this&lt;/STRONG&gt;:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: left; background-color: rgb(102, 144, 188); color: rgb(255, 255, 255); padding: 2px;" valign="middle"&gt;Year&lt;/TH&gt;&lt;TH style="text-align: left; background-color: rgb(102, 144, 188); color: rgb(255, 255, 255); padding: 2px;" valign="middle"&gt;Account&lt;/TH&gt;&lt;TH style="text-align: left; background-color: rgb(102, 144, 188); color: rgb(255, 255, 255); padding: 2px;" valign="middle"&gt;Period ID&lt;/TH&gt;&lt;TH style="text-align: right; background-color: rgb(102, 144, 188); color: rgb(255, 255, 255); padding: 2px;" valign="middle"&gt;Debits&lt;/TH&gt;&lt;TH style="text-align: right; background-color: rgb(102, 144, 188); color: rgb(255, 255, 255); padding: 2px;" valign="middle"&gt;Credits&lt;/TH&gt;&lt;TH style="text-align: right; background-color: rgb(102, 144, 188); color: rgb(255, 255, 255); padding: 2px;" valign="middle"&gt;Net Activity&lt;/TH&gt;&lt;TH style="text-align: right; background-color: rgb(102, 144, 188); color: rgb(255, 255, 255); padding: 2px;" valign="middle"&gt;Period Balance&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;2014&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: left;"&gt;####&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0-BEG&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;5,900,000.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;6,700,000.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;-800,000.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;-800,000.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2014&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;####&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;1-JAN&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;8,500,000.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;&lt;P&gt;9,800,000.00&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;-1,300,000.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;-2,100,000.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2014&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;####&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2-FEB&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;0.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;1,200,000.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;1,200,000.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;-900,000.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2014&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;####&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3-MAR&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;0.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;1,000,000.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;1,000,000.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;100,000.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2014&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;####&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4-APR&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;-100,000.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;600,000.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;500,000.00&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: right;"&gt;600,000.00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;I &lt;SPAN style="text-decoration: underline;"&gt;do know&lt;/SPAN&gt;: how to pull in the account details, debits, credits, and calculate the net activity. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I &lt;SPAN style="text-decoration: underline;"&gt;do not know&lt;/SPAN&gt;: 1) if I should calculate the net activity and period balance in the script or if I should create an expression in an object, 2) how to calculate a cumulative period balance by account (beginning with period 0 -the beginning balance- and adding the net activity by period, and then displaying that total per period).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #ff0000;"&gt;Here's the script I've been playing with so far, but the last line of the LOAD statement is giving me issues&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GP_Activity:&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;LOAD&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Open Year] as [Year],&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Period ID] as [PeriodID], &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Account Index] as [Index], &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Account Number] as [GP Acct], &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Left([Account Number],4) as [GP CC], &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Right([Account Number],4) as [GP Class], &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Account Description] as [Description], &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Debit Amount] as [Debits],&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Credit Amount] as [Credits],&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Debit Amount]-[Credit Amount] as [Net Activity],&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; IF([Period ID]=0,(Sum([Debit Amount])-Sum([Credit Amount])),PEEK([Period Balance],-1)+(Sum([Debit Amount])-Sum([Credit Amount]))) as [Period Balance];&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;SELECT &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Open Year],&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Period ID], &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Account Index], &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Account Number], &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Left([Account Number],4) as [GP CC], &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Right([Account Number],4) as [GP Class], &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Account Description], &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Debit Amount],&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; [Credit Amount],&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;FROM dbo."AccountTransactions"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;ORDER BY [Account Number],[Period ID];&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your time &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 00:09:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612282#M682033</guid>
      <dc:creator />
      <dc:date>2014-03-07T00:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Trial Balance by Account and Period</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612283#M682034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Nicole Adamczyk wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I &lt;SPAN style="text-decoration: underline;"&gt;do not know&lt;/SPAN&gt;: 1) if I should calculate the net activity and period balance in the script or if I should create an expression in an object&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I would calculate it on the chart if possible.&amp;nbsp; That way, any selections you make in QlikView will affect the calculation (if you calculate it in the script, you're stuck with static numbers).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Nicole Adamczyk wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I &lt;SPAN style="text-decoration: underline;"&gt;do not know&lt;/SPAN&gt;: 2) how to calculate a cumulative period balance by account (beginning with period 0 -the beginning balance- and adding the net activity by period, and then displaying that total per period).&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Have a look a these two posts on how to do accumulative sums: &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2012/10/12/accumulative-sums" title="http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/12/accumulative-sums"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/12/accumulative-sums, &lt;/A&gt;&lt;A href="https://community.qlik.com/docs/DOC-4252"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 15:16:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612283#M682034</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-03-07T15:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Trial Balance by Account and Period</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612284#M682035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're using an aggregation function in your load statement without a group by clause. That's causing the error. Try leaving the sum out:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IF([Period ID]=0,(([Debit Amount])-([Credit Amount])),PEEK([Period Balance],-1)+(([Debit Amount])-([Credit Amount]))) as [Period Balance];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;You may have to change the order by clause in the select statement to avoid getting the period balance of a previous account instead of the previous period.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 15:28:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612284#M682035</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-03-07T15:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Trial Balance by Account and Period</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612285#M682036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think its need group by &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because you are using sum function&amp;nbsp; in script&amp;nbsp; and any aggregate function can not be used without Group by.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 15:29:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612285#M682036</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2014-03-07T15:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Trial Balance by Account and Period</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612286#M682037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nicole,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you tell me how you connect to Microsofts Dynamic GP via qlikview.&amp;nbsp;&amp;nbsp; Do you connect directly?&amp;nbsp; I have a new client with MS Dynamics and hoping it is an easy connection rather than an export process.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 13:50:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612286#M682037</guid>
      <dc:creator />
      <dc:date>2014-08-04T13:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Trial Balance by Account and Period</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612287#M682038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nicole, You should have the use Group By clause if you are using any Aggregation function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 17:12:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612287#M682038</guid>
      <dc:creator />
      <dc:date>2014-08-04T17:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Trial Balance by Account and Period</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612288#M682039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Debbie - I am connecting directly to our Dynamics GP server.&amp;nbsp; I have been able to pull historical and open transactions including the trial balance and accounts payable detail, all linked together.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 17:25:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612288#M682039</guid>
      <dc:creator />
      <dc:date>2014-08-04T17:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Trial Balance by Account and Period</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612289#M682040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I figured it out!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 17:26:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Trial-Balance-by-Account-and-Period/m-p/612289#M682040</guid>
      <dc:creator />
      <dc:date>2014-08-04T17:26:04Z</dc:date>
    </item>
  </channel>
</rss>

