<?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: need to loop through to get period from field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297675#M27495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The 4th subfield, i.e.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Subfield(myField, '_',1)&amp;nbsp; = GL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Subfield(myField, '_',2) = CLOSING&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Subfield(myField, '_',3)&amp;nbsp; = BALANCE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Subfield(myField, '_',4)&amp;nbsp; = 01&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; 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-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Note thaat you may want to do sometign like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'Period' &amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Subfield(myField, '_',4) AS Period&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; 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-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Which would yield 'Period01' for he field value.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Apr 2017 21:45:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-04-18T21:45:36Z</dc:date>
    <item>
      <title>need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297667#M27487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table that has GL ACCOUNT BALANCES.&amp;nbsp; It has numbers for each GL account for each year.&amp;nbsp; The record has closing balance for each period, although PERIOD is not a field on the table.&amp;nbsp; I really need to have PERIOD as a field to link to the transactions table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know there is a way to loop through the table and pull out a portion of the field to use as the period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field name:&amp;nbsp; GL_CLOSING_BALANCE_01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The period is 01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;same for GL_CLOSING_BALANCE_02 through 12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to loop through&amp;nbsp;&amp;nbsp; for i=01-12 and have a closing balance for each period.&amp;nbsp; I would like for the user to be able to choose a PERIOD and have the report pull the correct closing balance for them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am pulling this info from a qvd called GL_ACCOUNT_BALANCES.QVD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if I have given enough information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2017 01:27:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297667#M27487</guid>
      <dc:creator />
      <dc:date>2017-04-11T01:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297668#M27488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need a loop for this - you could just use &lt;A href="https://community.qlik.com/qlik-blogpost/3628"&gt;The Crosstable Load&lt;/A&gt; to transform your data into a "normal" table-structure and then you could use some string-functions to get the period-informations from the field-value, for example: keepchar(FIELD, 0123456789).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2017 05:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297668#M27488</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-04-13T05:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297669#M27489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; I got the crosstable to work but still don't have the PERIOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CrossTable([PERIOD], Data,3)&lt;/P&gt;&lt;P&gt;LOAD [GL Account], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Current Year], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Balance Type], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Currency, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Status Flag], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Year to Date DR], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Year to Date CR], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Opening DR], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Opening CR], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Period 01 DR], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Period 01 CR], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Period 02 DR], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Period 02 CR], ........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no period in the table.&amp;nbsp; I need to have period=01 for period 01 DR and Period 01 CR, period=02 for period 02 DR and CR......&amp;nbsp; I don't know how to have it create a numeric field from another field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2017 23:41:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297669#M27489</guid>
      <dc:creator />
      <dc:date>2017-04-13T23:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297670#M27490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use something like this in an on the crosstable following load:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;crosstable:&lt;/P&gt;&lt;P&gt;crosstable([PERIOD], Data,&lt;STRONG&gt;5&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;Load * from SOURCE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;final:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [GL Account], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Balance Type],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Currency, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Status Flag], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; makedate([Current Year], num(keepchar(PERIOD, '0123456789'))) as Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; right(PERIOD,2) as Type,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data&lt;/P&gt;&lt;P&gt;resident crosstable;&lt;/P&gt;&lt;P&gt;drop tables crosstables;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Apr 2017 15:30:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297670#M27490</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-04-17T15:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297671#M27491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your time on this.&amp;nbsp; I'm trying to understand your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I have.&amp;nbsp; I have played around with the fields a little to make sure they are named correctly.&lt;/P&gt;&lt;P&gt;The whole top section is the crosstable that you coded.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I stop after drop crosstable, it runs and I get some data. But then I try to add the fields I need based on this new field called period, and it fails but I don't get an error.&amp;nbsp; It just says the data didn't load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions to move on from here.&lt;/P&gt;&lt;P&gt;Now that I have period, I need to use it.&amp;nbsp; I need to show the opening balance for period 01-12.&amp;nbsp; That is what I'm trying to do with the new piece of code I acted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="4-17-2017 3-50-47 PM.jpg" class="jive-image image-3" src="/legacyfs/online/160273_4-17-2017 3-50-47 PM.jpg" style="height: 374px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;crosstable:&lt;/P&gt;&lt;P&gt;crosstable([PERIOD], Data,5)&lt;/P&gt;&lt;P&gt;Load * &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; FROM &lt;/P&gt;&lt;P&gt;[$(vQVD)FIN_GL_ACCOUNT_BALANCES.QVD]&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;final:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACCOUNT_NUMBER AS GL_ACCT_KEY,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACCOUNT_IDENT,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SYS_CURRENCY_CODE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //DELETE_FLAG,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; makedate(CURRENT_YEAR, num(keepchar(PERIOD, '0123456789'))) as Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; right(PERIOD,2) as PERIOD,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;resident crosstable;&lt;/P&gt;&lt;P&gt;drop table crosstable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEMP_GL:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//OPENING BALANCE&lt;/P&gt;&lt;P&gt;IF(PERIOD='01',(GL_BALANCE_00),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(PERIOD='02',(GL_CLOSE_BALANCE_01),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(PERIOD='03',(GL_CLOSE_BALANCE_02),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(PERIOD='04',(GL_CLOSE_BALANCE_03),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(PERIOD='05',(GL_CLOSE_BALANCE_04),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(PERIOD='06',(GL_CLOSE_BALANCE_05),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(PERIOD='07',(GL_CLOSE_BALANCE_06),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(PERIOD='08',(GL_CLOSE_BALANCE_07),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(PERIOD='09',(GL_CLOSE_BALANCE_08),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(PERIOD='10',(GL_CLOSE_BALANCE_09),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(PERIOD='11',(GL_CLOSE_BALANCE_10),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(PERIOD='012',(GL_CLOSE_BALANCE_11),))))))))))))AS GL_PERIOD_OPEN_BAL,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT FINAL;&lt;/P&gt;&lt;P&gt;DROP TABLE FINAL;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Apr 2017 21:06:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297671#M27491</guid>
      <dc:creator />
      <dc:date>2017-04-17T21:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297672#M27492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that I would use such nested-if loop - I would extract all informations from the fiel PERIOD with string-functions - two are mentioned above to create a date (which will be later connected to a master-calendar) and a Type field related to DR respectively CR. For example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subfield(PERIOD, '_', 2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to get a certain substring from my field or maybe more suitable here something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pick(wildmatch(PERIOD, '*CLOSE*', '*OENING*', '*DR*', '*CR*'),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Close', 'Open', 'DR', 'CR')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe extended to further values and/or splitted into several Type fields. Also I would think to exclude some not needed values - for example if there are any TOTAL's within them because they would be calculated from the other values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another point which could make the life much easier would be if you could load the source-data to this huge crosstable-report. Quite probably there is a nice data-structure within a database and with much efforts will be such a report created and than if you need to work with the data from it you need much efforts to re-create a workable data-structure - it's not uncommon but it made not much sense ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2017 07:09:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297672#M27492</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-04-18T07:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297673#M27493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a Load script you could also do:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;, ...&lt;/P&gt;&lt;P&gt;, Subfield(myField, '_',4) AS Period&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where myField has values like &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;GL_CLOSING_BALANCE_01&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2017 17:59:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297673#M27493</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-18T17:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297674#M27494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That sounds like a plan.&amp;nbsp; What does the 4 mean?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2017 21:20:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297674#M27494</guid>
      <dc:creator />
      <dc:date>2017-04-18T21:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297675#M27495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The 4th subfield, i.e.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Subfield(myField, '_',1)&amp;nbsp; = GL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Subfield(myField, '_',2) = CLOSING&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Subfield(myField, '_',3)&amp;nbsp; = BALANCE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Subfield(myField, '_',4)&amp;nbsp; = 01&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; 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-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Note thaat you may want to do sometign like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'Period' &amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Subfield(myField, '_',4) AS Period&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; 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-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Which would yield 'Period01' for he field value.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2017 21:45:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297675#M27495</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-18T21:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297676#M27496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; That makes perfect sense.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want is for the user to be able to choose a period (1-12) and see the closing balance for that period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used your example and created this:&lt;/P&gt;&lt;P&gt;Subfield(GL_CLOSE_BALANCE_01,'_',4) AS PERIOD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This runs ok, but period is blank when I look at the data.&amp;nbsp; I would have thought I would have seen an 01 for the period data.&amp;nbsp; So this makes a column called PERIOD, but it has no data.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still don't think this gets me there even if I get it working.&amp;nbsp; I feel I need to say if the field name is gl close balance 01 then period =01, if field name is gl close balance 02, then period = 02.&amp;nbsp; Or some type of loop through to get all of the periods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a few fields that I will need to link to that period once I get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GL CLOSE BALANCE 01 THROUGH 12&lt;/P&gt;&lt;P&gt;GL_BALANCE_01 THROUGH 12&lt;/P&gt;&lt;P&gt;ETC.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2017 16:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297676#M27496</guid>
      <dc:creator />
      <dc:date>2017-04-24T16:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297677#M27497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was presuming that your data looked something like:&lt;/P&gt;&lt;P&gt;dataType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;GL_BALANCE_01 THROUGH 12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 45.6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;GL_CLOSE_BALANCE_01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 37.4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&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; font-size: 13px;"&gt;In which case subfield(dataType, '_',4) AS Period would populate the field period&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&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; font-size: 13px;"&gt;You are suggesting that the field name is &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;GL_CLOSE_BALANCE_01&lt;/SPAN&gt; and so &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;GL_CLOSE_BALANCE_01&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;45.6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;37.4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; 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-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;In which case you would need to do &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;subfield('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;GL_CLOSE_BALANCE_01&lt;/SPAN&gt;', '_',4) AS Period, i;e; treat the field name as a string literal.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; 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-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Maybe helpful to post a small sample of your data and what you are trying to achieve.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2017 17:41:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297677#M27497</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-24T17:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297678#M27498</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 style="font-size: 13.3333px;"&gt;I have attached two of the tables that need to link together based on PERIOD (journal_period in the detail transactions table).&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;In the end, what I am looking for would be:&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;The user can choose a PERIOD and the Opening balance, balance, and closing balance would change based on that period.&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;the fields are:&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;GL_CLOSING_BALANCE_00 (OPENING BALANCE FOR THE YEAR)&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;GL_BALANCE_01 (THE SUM OF THE TRANSACTIONS FOR PERIOD 01)&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;GL_CLOSING BALANCE_01 (CLOSING BALANCE FOR PERIOD 01)&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;THEN SAME FOR PERIOD 02&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;GL_CLOSING_BALANCE_01 (OPENING BALANCE FOR 02)&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;GL_BALANCE_02&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;GL_CLOSING_BALANCE_02&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;AND SO ON FOR ALL 12 PERIODS.&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;It needs to link by PERIOD over to the other detail table (gl_tran_lines_ to pull detail info on another sheet of the report)&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 19:02:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297678#M27498</guid>
      <dc:creator />
      <dc:date>2017-04-25T19:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297679#M27499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more thing:&amp;nbsp; here is what I have put together for each period.&amp;nbsp; I want it like this but to be able to choose a period rather than have a new sheet for each one.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="4-25-2017 2-06-51 PM.jpg" class="jive-image image-1" src="/legacyfs/online/161188_4-25-2017 2-06-51 PM.jpg" style="height: 312px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 19:09:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297679#M27499</guid>
      <dc:creator />
      <dc:date>2017-04-25T19:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297680#M27500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you need to do it normalize your data.&amp;nbsp; You might try something like this (undoubtedly many ways to do this)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// load the first spreadsheet&lt;/P&gt;&lt;P&gt;[acct_temp]:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt; FROM [lib://examples/gl_account_balances table for one account only.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// normalize it&lt;/P&gt;&lt;P&gt;[acct]:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;[GL Account] &amp;amp; '-' &amp;amp; [Balance Type] &amp;amp; '-' &amp;amp; [Current Year] &amp;amp; '-' &amp;amp; [Currency] &amp;amp; '-' &amp;amp; '1' AS myKey&lt;/P&gt;&lt;P&gt;,[Currency]&lt;/P&gt;&lt;P&gt;,[Current Year]&lt;/P&gt;&lt;P&gt;,[Balance Type]&lt;/P&gt;&lt;P&gt;,[GL Account]&lt;/P&gt;&lt;P&gt;,'1' AS Period&lt;/P&gt;&lt;P&gt;,[Period 01 DR] AS DR&lt;/P&gt;&lt;P&gt;,[Period 01 CR] AS CR&lt;/P&gt;&lt;P&gt;,[Closing DR Balance 1] AS Closing_DR_Balance&lt;/P&gt;&lt;P&gt;,[Closing CR Balance 1] AS Closing_CR_Balance&lt;/P&gt;&lt;P&gt;,[Balance Period 1] AS Balance&lt;/P&gt;&lt;P&gt;,[Closing Balance 1] AS Closing_Balance&lt;/P&gt;&lt;P&gt;// other fields as needed&lt;/P&gt;&lt;P&gt;Resident acct_temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;[GL Account] &amp;amp; '-' &amp;amp; [Balance Type] &amp;amp; '-' &amp;amp; [Current Year] &amp;amp; '-' &amp;amp; [Currency] AS myKey&lt;/P&gt;&lt;P&gt;,[Currency]&lt;/P&gt;&lt;P&gt;,[Current Year]&lt;/P&gt;&lt;P&gt;,[Balance Type]&lt;/P&gt;&lt;P&gt;,[GL Account]&lt;/P&gt;&lt;P&gt;,'2' AS Period&lt;/P&gt;&lt;P&gt;,[Period 02 DR] AS DR&lt;/P&gt;&lt;P&gt;,[Period 02 CR] AS CR&lt;/P&gt;&lt;P&gt;,[Closing DR Balance 2] AS Closing_DR_Balance&lt;/P&gt;&lt;P&gt;,[Closing CR Balance 2] AS Closing_CR_Balance&lt;/P&gt;&lt;P&gt;,[Balance Period 2] AS Balance&lt;/P&gt;&lt;P&gt;,[Closing Balance 2] AS Closing_Balance&lt;/P&gt;&lt;P&gt;Resident acct_temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// and so on for all the periods you want&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table acct_temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// then the second&lt;/P&gt;&lt;P&gt;[trans_temp]:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt; FROM [lib://examples/gl tran lines-detail for same account number.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[trans]:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;[GL Account] &amp;amp; '-' &amp;amp; [Balance Type] &amp;amp; '-' &amp;amp; [Current Year] &amp;amp; '-' &amp;amp; [Currency] &amp;amp; '-' &amp;amp; [Journal Period] AS myKey&lt;/P&gt;&lt;P&gt;, [Credit Value] AS Credit_Value&lt;/P&gt;&lt;P&gt;// other fields you want&lt;/P&gt;&lt;P&gt;Resident [trans_temp];&lt;/P&gt;&lt;P&gt;Drop table trans_temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The tables are now associated by the key that contains the four fields you indicated plus period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 20:29:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297680#M27500</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-25T20:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297681#M27501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That makes sense.&amp;nbsp; Let me try that!&amp;nbsp; I'll let you know how it turns out!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a million for your help and time!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 20:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297681#M27501</guid>
      <dc:creator />
      <dc:date>2017-04-25T20:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297682#M27502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My solution is a more "brute force" way of what Marcus was helping you with above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 20:36:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297682#M27502</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-25T20:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297683#M27503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Everything worked perfectly for period 01, but when I added period 02 it didn't like it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because I already used the field names in the period 01 load, it is creating many synthetic keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my code:&lt;/P&gt;&lt;P&gt;GL_ACCOUNT_BALANCES:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ACCOUNT_NUMBER AS GL_ACCT_KEY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM &lt;/P&gt;&lt;P&gt;[$(vQVD)FIN_GL_ACCOUNT_BALANCES.QVD]&lt;/P&gt;&lt;P&gt;(qvd) where ACCOUNT_IDENT='ACTUAL' ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERIOD_BALANCES:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;ACCOUNT_NUMBER AS GL_ACCT_KEY,&lt;/P&gt;&lt;P&gt;ACCOUNT_NUMBER&amp;amp;'|'&amp;amp;CURRENT_YEAR &amp;amp;'|'&amp;amp; GL_ELEMENT_01 &amp;amp;'|'&amp;amp;SYS_CURRENCY_CODE AS GL_TRANS_FULL_KEY,&lt;/P&gt;&lt;P&gt;'01' as PERIOD,&lt;/P&gt;&lt;P&gt;CURRENT_YEAR,&lt;/P&gt;&lt;P&gt;ACCOUNT_NUMBER,&lt;/P&gt;&lt;P&gt;ACCOUNT_IDENT,&lt;/P&gt;&lt;P&gt;SYS_CURRENCY_CODE,&lt;/P&gt;&lt;P&gt;GL_ELEMENT_01 AS COMPANY_CODE,&lt;/P&gt;&lt;P&gt;GL_BALANCE_00 AS OPENING_BALANCE,&lt;/P&gt;&lt;P&gt;GL_CLOSE_BALANCE_01 AS CLOSING_BALANCE,&lt;/P&gt;&lt;P&gt;GL_BALANCE_01 AS PERIOD_TRANS_BALANCE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT&amp;nbsp; GL_ACCOUNT_BALANCES;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;'02' AS PERIOD,&lt;/P&gt;&lt;P&gt;GL_CLOSE_BALANCE_01 AS OPENING_BALANCE,&lt;/P&gt;&lt;P&gt;GL_BALANCE_02 AS PERIOD_TRANS_BALANCE&lt;/P&gt;&lt;P&gt;RESIDENT&amp;nbsp; GL_ACCOUNT_BALANCES;&lt;/P&gt;&lt;P&gt;DROP TABLE GL_ACCOUNT_BALANCES;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So everything looks good until I start the load for period 02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is saying that I already loaded a field called PERIOD, and also loaded a field called opening balance, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I seem to be missing something between the first load and second load to let it know I'm done with the data load for period 01, but need to keep loading with a new period.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 23:11:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297683#M27503</guid>
      <dc:creator />
      <dc:date>2017-04-25T23:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297684#M27504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Concatenated tables have to have the same schema, i.e field names.&amp;nbsp; Yours don;t.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 23:21:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297684#M27504</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-25T23:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297685#M27505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the problem isn't the field names, but the alias names.....so I've already loaded period as 01, now I'm loading it as 02.&amp;nbsp; same for opening balance, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I comment out the period 02 section, it runs fine (see attached).&amp;nbsp; As soon as I load period, opening balance, gl_account_balances, it fails and says I have already loaded those fields.&amp;nbsp; &lt;IMG alt="4-25-2017 7-14-38 PM.jpg" class="jive-image image-1" src="/legacyfs/online/161227_4-25-2017 7-14-38 PM.jpg" style="height: 298px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once I add a few fields for the period 02 section it looks like this:&lt;/P&gt;&lt;P&gt;PERIOD_BALANCES:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;ACCOUNT_NUMBER AS GL_ACCT_KEY,&lt;/P&gt;&lt;P&gt;ACCOUNT_NUMBER&amp;amp;'|'&amp;amp;CURRENT_YEAR &amp;amp;'|'&amp;amp; GL_ELEMENT_01 &amp;amp;'|'&amp;amp;SYS_CURRENCY_CODE AS GL_TRANS_FULL_KEY,&lt;/P&gt;&lt;P&gt;'01' as PERIOD,&lt;/P&gt;&lt;P&gt;CURRENT_YEAR,&lt;/P&gt;&lt;P&gt;ACCOUNT_NUMBER,&lt;/P&gt;&lt;P&gt;ACCOUNT_IDENT,&lt;/P&gt;&lt;P&gt;SYS_CURRENCY_CODE,&lt;/P&gt;&lt;P&gt;GL_ELEMENT_01 AS COMPANY_CODE,&lt;/P&gt;&lt;P&gt;GL_BALANCE_00 AS OPENING_BALANCE,&lt;/P&gt;&lt;P&gt;GL_CLOSE_BALANCE_01 AS CLOSING_BALANCE,&lt;/P&gt;&lt;P&gt;GL_BALANCE_01 AS PERIOD_TRANS_BALANCE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT&amp;nbsp; GL_ACCOUNT_BALANCES;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;'02' AS PERIOD,&lt;/P&gt;&lt;P&gt;GL_CLOSE_BALANCE_01 AS OPENING_BALANCE,&lt;/P&gt;&lt;P&gt;GL_BALANCE_02 AS PERIOD_TRANS_BALANCE&lt;/P&gt;&lt;P&gt;RESIDENT&amp;nbsp; GL_ACCOUNT_BALANCES;&lt;/P&gt;&lt;P&gt;DROP TABLE GL_ACCOUNT_BALANCES;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="4-25-2017 7-20-09 PM.jpg" class="jive-image image-2" src="/legacyfs/online/161240_4-25-2017 7-20-09 PM.jpg" style="height: 474px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2017 00:21:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297685#M27505</guid>
      <dc:creator />
      <dc:date>2017-04-26T00:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: need to loop through to get period from field</title>
      <link>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297686#M27506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You code needs to look 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;PERIOD_BALANCES:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;load&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ACCOUNT_NUMBER AS GL_ACCT_KEY,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ACCOUNT_NUMBER&amp;amp;'|'&amp;amp;CURRENT_YEAR &amp;amp;'|'&amp;amp; GL_ELEMENT_01 &amp;amp;'|'&amp;amp;SYS_CURRENCY_CODE AS GL_TRANS_FULL_KEY,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;'01' as PERIOD,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;CURRENT_YEAR,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ACCOUNT_NUMBER,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ACCOUNT_IDENT,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SYS_CURRENCY_CODE,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;GL_ELEMENT_01 AS COMPANY_CODE,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;GL_BALANCE_00 AS OPENING_BALANCE,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;GL_CLOSE_BALANCE_01 AS CLOSING_BALANCE,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;GL_BALANCE_01 AS PERIOD_TRANS_BALANCE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RESIDENT&amp;nbsp; GL_ACCOUNT_BALANCES;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;EM&gt;ACCOUNT_NUMBER AS GL_ACCT_KEY,&lt;/EM&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&gt;&lt;EM&gt;ACCOUNT_NUMBER&amp;amp;'|'&amp;amp;CURRENT_YEAR &amp;amp;'|'&amp;amp; GL_ELEMENT_01 &amp;amp;'|'&amp;amp;SYS_CURRENCY_CODE AS GL_TRANS_FULL_KEY,&lt;/EM&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;'02' AS PERIOD,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;EM&gt;CURRENT_YEAR,&lt;/EM&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;EM&gt;&lt;STRONG&gt;ACCOUNT_NUMBER,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;&lt;STRONG&gt;ACCOUNT_IDENT,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;&lt;STRONG&gt;SYS_CURRENCY_CODE,&lt;/STRONG&gt;&lt;/EM&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&gt;&lt;EM&gt;GL_ELEMENT_01 AS COMPANY_CODE,&lt;/EM&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;GL_CLOSE_BALANCE_01 AS OPENING_BALANCE,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;GL_BALANCE_02 AS PERIOD_TRANS_BALANCE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RESIDENT&amp;nbsp; GL_ACCOUNT_BALANCES;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;DROP TABLE GL_ACCOUNT_BALANCES;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;When you load the data for period 2 you have to have the same field set as in the section for period 1, otherwise Qlik creates a new table for the period 2 data.&amp;nbsp; And since you have several of the filed names the same, you get all of those synthetic keys.&amp;nbsp; If you have exactly the same set of fields then Qlik simply appends the period 2 data to the PERIOD_BALANCES table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2017 13:37:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/need-to-loop-through-to-get-period-from-field/m-p/1297686#M27506</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-26T13:37:21Z</dc:date>
    </item>
  </channel>
</rss>

