<?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 Dynamic periodes and crosstable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamic-periodes-and-crosstable/m-p/1786144#M61300</link>
    <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I have below data set&amp;nbsp;&lt;/P&gt;&lt;P&gt;//--Creating crosstable to get the Periode values in single column--//&lt;BR /&gt;CrossTable(PERIOD_AUX, FLAG, 30)&lt;BR /&gt;TableAux:&lt;BR /&gt;LOAD&lt;BR /&gt;"SOURCEID",&lt;BR /&gt;"ENTITY",&lt;BR /&gt;"BUKRS",&lt;BR /&gt;"BUTXT",&lt;BR /&gt;"LANDX",&lt;BR /&gt;"REGION",&lt;BR /&gt;"DIVISION",&lt;BR /&gt;"BLART",&lt;BR /&gt;"BELNR",&lt;BR /&gt;"AUGDT",&lt;BR /&gt;"AUGBL",&lt;BR /&gt;"KUNNR",&lt;BR /&gt;"BLDAT",&lt;BR /&gt;"CPUDT",&lt;BR /&gt;"LIFNR",&lt;BR /&gt;"NAME1",&lt;BR /&gt;"KTOKK",&lt;BR /&gt;"TXT30",&lt;BR /&gt;"NBOFDAYS",&lt;BR /&gt;"BUZEI",&lt;BR /&gt;"SGTXT",&lt;BR /&gt;"HKONT",&lt;BR /&gt;"TXT50",&lt;BR /&gt;"BUDAT",&lt;BR /&gt;"TOTAL",&lt;BR /&gt;"WAERS",&lt;BR /&gt;"TOTAL_L",&lt;BR /&gt;"HWAER",&lt;BR /&gt;"AMOUNT_EUR",&lt;BR /&gt;"CATEGORY",&lt;BR /&gt;"PERIOD_1",&lt;BR /&gt;"PERIOD_2",&lt;BR /&gt;"PERIOD_3",&lt;BR /&gt;"PERIOD_4",&lt;BR /&gt;"PERIOD_5",&lt;BR /&gt;"PERIOD_6",&lt;BR /&gt;"PERIOD_7",&lt;BR /&gt;"PERIOD_8",&lt;BR /&gt;"PERIOD_9",&lt;BR /&gt;"PERIOD_10",&lt;BR /&gt;"PERIOD_11",&lt;BR /&gt;"PERIOD_12",&lt;BR /&gt;"PERIOD_13"&lt;BR /&gt;FROM [...]&lt;BR /&gt;(qvd) ;&amp;nbsp; //-attached the excel file for reference&lt;/P&gt;&lt;P&gt;====================================================================&lt;/P&gt;&lt;P&gt;The values for the periodes are dynamic at backend , eg if periode_1 is Jan2021, when we the March month comes, the&amp;nbsp;&lt;/P&gt;&lt;P&gt;value for "PERIOD_1" will become Feb 2021&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_0-1614255293015.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49857iCCD83A622CC9D67F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_0-1614255293015.png" alt="Aspiring_Developer_0-1614255293015.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The value inside all the "Periode" fields is either 0 or 1. Hence i created a crosstable for the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Requirement :-&lt;/P&gt;&lt;P&gt;1) to calculate the sum(AMOUNT_EUR) when Flag is 1&lt;/P&gt;&lt;P&gt;2) to get the period values as dynamic&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried below --//created a new table to get dynamic monthnames&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Final_Data:&amp;nbsp; &amp;nbsp;//created new table&amp;nbsp;&lt;BR /&gt;Load&lt;BR /&gt;"SOURCEID",&lt;BR /&gt;monthname(addmonths(today(), -num#(subfield(PERIOD_AUX, '_', 2)))) as PERIOD,&lt;BR /&gt;AMOUNT_EUR as AMOUNT&lt;BR /&gt;Resident TableAux&lt;BR /&gt;Where FLAG=1;&lt;/P&gt;&lt;P&gt;By using above table, i got the name of the month:-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_0-1614256307260.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49862i5DB5333F72AD3EE0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_0-1614256307260.png" alt="Aspiring_Developer_0-1614256307260.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=====================================&lt;/P&gt;&lt;P&gt;Expected output:-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_3-1614255912935.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49861iCEEF687054D35FCA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_3-1614255912935.png" alt="Aspiring_Developer_3-1614255912935.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My ouptput:-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_2-1614255774553.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49859iE0EF021CCF5F518D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_2-1614255774553.png" alt="Aspiring_Developer_2-1614255774553.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When i create a new table, the values for Amount increases , the data gets increased.&lt;/P&gt;&lt;P&gt;I am not able to figure out why and how we can achieve this to get the right output. Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Feb 2021 12:35:37 GMT</pubDate>
    <dc:creator>Aspiring_Developer</dc:creator>
    <dc:date>2021-02-25T12:35:37Z</dc:date>
    <item>
      <title>Dynamic periodes and crosstable</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-periodes-and-crosstable/m-p/1786144#M61300</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I have below data set&amp;nbsp;&lt;/P&gt;&lt;P&gt;//--Creating crosstable to get the Periode values in single column--//&lt;BR /&gt;CrossTable(PERIOD_AUX, FLAG, 30)&lt;BR /&gt;TableAux:&lt;BR /&gt;LOAD&lt;BR /&gt;"SOURCEID",&lt;BR /&gt;"ENTITY",&lt;BR /&gt;"BUKRS",&lt;BR /&gt;"BUTXT",&lt;BR /&gt;"LANDX",&lt;BR /&gt;"REGION",&lt;BR /&gt;"DIVISION",&lt;BR /&gt;"BLART",&lt;BR /&gt;"BELNR",&lt;BR /&gt;"AUGDT",&lt;BR /&gt;"AUGBL",&lt;BR /&gt;"KUNNR",&lt;BR /&gt;"BLDAT",&lt;BR /&gt;"CPUDT",&lt;BR /&gt;"LIFNR",&lt;BR /&gt;"NAME1",&lt;BR /&gt;"KTOKK",&lt;BR /&gt;"TXT30",&lt;BR /&gt;"NBOFDAYS",&lt;BR /&gt;"BUZEI",&lt;BR /&gt;"SGTXT",&lt;BR /&gt;"HKONT",&lt;BR /&gt;"TXT50",&lt;BR /&gt;"BUDAT",&lt;BR /&gt;"TOTAL",&lt;BR /&gt;"WAERS",&lt;BR /&gt;"TOTAL_L",&lt;BR /&gt;"HWAER",&lt;BR /&gt;"AMOUNT_EUR",&lt;BR /&gt;"CATEGORY",&lt;BR /&gt;"PERIOD_1",&lt;BR /&gt;"PERIOD_2",&lt;BR /&gt;"PERIOD_3",&lt;BR /&gt;"PERIOD_4",&lt;BR /&gt;"PERIOD_5",&lt;BR /&gt;"PERIOD_6",&lt;BR /&gt;"PERIOD_7",&lt;BR /&gt;"PERIOD_8",&lt;BR /&gt;"PERIOD_9",&lt;BR /&gt;"PERIOD_10",&lt;BR /&gt;"PERIOD_11",&lt;BR /&gt;"PERIOD_12",&lt;BR /&gt;"PERIOD_13"&lt;BR /&gt;FROM [...]&lt;BR /&gt;(qvd) ;&amp;nbsp; //-attached the excel file for reference&lt;/P&gt;&lt;P&gt;====================================================================&lt;/P&gt;&lt;P&gt;The values for the periodes are dynamic at backend , eg if periode_1 is Jan2021, when we the March month comes, the&amp;nbsp;&lt;/P&gt;&lt;P&gt;value for "PERIOD_1" will become Feb 2021&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_0-1614255293015.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49857iCCD83A622CC9D67F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_0-1614255293015.png" alt="Aspiring_Developer_0-1614255293015.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The value inside all the "Periode" fields is either 0 or 1. Hence i created a crosstable for the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Requirement :-&lt;/P&gt;&lt;P&gt;1) to calculate the sum(AMOUNT_EUR) when Flag is 1&lt;/P&gt;&lt;P&gt;2) to get the period values as dynamic&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried below --//created a new table to get dynamic monthnames&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Final_Data:&amp;nbsp; &amp;nbsp;//created new table&amp;nbsp;&lt;BR /&gt;Load&lt;BR /&gt;"SOURCEID",&lt;BR /&gt;monthname(addmonths(today(), -num#(subfield(PERIOD_AUX, '_', 2)))) as PERIOD,&lt;BR /&gt;AMOUNT_EUR as AMOUNT&lt;BR /&gt;Resident TableAux&lt;BR /&gt;Where FLAG=1;&lt;/P&gt;&lt;P&gt;By using above table, i got the name of the month:-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_0-1614256307260.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49862i5DB5333F72AD3EE0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_0-1614256307260.png" alt="Aspiring_Developer_0-1614256307260.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=====================================&lt;/P&gt;&lt;P&gt;Expected output:-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_3-1614255912935.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49861iCEEF687054D35FCA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_3-1614255912935.png" alt="Aspiring_Developer_3-1614255912935.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My ouptput:-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_2-1614255774553.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49859iE0EF021CCF5F518D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_2-1614255774553.png" alt="Aspiring_Developer_2-1614255774553.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When i create a new table, the values for Amount increases , the data gets increased.&lt;/P&gt;&lt;P&gt;I am not able to figure out why and how we can achieve this to get the right output. Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 12:35:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-periodes-and-crosstable/m-p/1786144#M61300</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2021-02-25T12:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic periodes and crosstable</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-periodes-and-crosstable/m-p/1786913#M61387</link>
      <description>&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can anyone please help me with the above problem ??????/&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 05:59:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-periodes-and-crosstable/m-p/1786913#M61387</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2021-03-01T05:59:27Z</dc:date>
    </item>
  </channel>
</rss>

