<?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: summing data for selected period in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1789592#M61695</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thank you for your reply. I took your solutions to my applications and it doesn't work.&lt;/P&gt;&lt;P&gt;I used the DATE field in the filtering.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the problem is in the DATE field. It is somehow the difference between filtering the DATE field and the DATA field in my table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found another statement:&lt;/P&gt;&lt;P&gt;sum({&amp;lt; PeriodFilter=, [Period ID]={"&amp;gt;=$(=max([Period ID])-12)&amp;lt;=$(=max([Period ID]))"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;but I don't know where I have Period ID or PeriodFilter field&lt;/P&gt;</description>
    <pubDate>Tue, 09 Mar 2021 13:03:54 GMT</pubDate>
    <dc:creator>MadKow19</dc:creator>
    <dc:date>2021-03-09T13:03:54Z</dc:date>
    <item>
      <title>summing data for selected period</title>
      <link>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1785718#M61259</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I have an app that contains data from 2017 to date. It contains months, accounting accounts, value, etc.&lt;BR /&gt;In the application, a filter field is inserted: month.&lt;/P&gt;&lt;P&gt;The value of the expression :&lt;BR /&gt;(Sum({&amp;lt;KONTO={"701*", "702*", "705*", "706*"}&amp;gt;} (KWOTA_MA))&lt;BR /&gt;+ Sum({&amp;lt;KONTO={"730*", "732*", "734*"}&amp;gt;}(KWOTA_MA))&lt;BR /&gt;+ Sum({&amp;lt;KONTO={"601*", "602*"} &amp;gt;}(KWOTA_WINIEN))&lt;BR /&gt;- Sum({&amp;lt;KONTO={"601*", "602*"} &amp;gt;}(KWOTA_MA)&lt;BR /&gt;+ Sum({&amp;lt;KONTO={"791*", "792*"} &amp;gt;}(KWOTA_MA))&lt;BR /&gt;+ Sum({&amp;lt;KONTO ={"400*","401*","402*","403*","404*","405*","408*","409*","410*","411*"} &amp;gt;}-(KWOTA_WINIEN))&lt;BR /&gt;+ Sum({&amp;lt; KONTO={"735*", "737*", "739*"}&amp;gt;}-(KWOTA_WINIEN))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my table:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NUMER_OKRESU,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NAZWA_OKRESU,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#(NAZWA_OKRESU,'MMMM YYYY'),'YYYY-MMMM') &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as DATA,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(Date#(NAZWA_OKRESU,'MMMM YYYY')) &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; as DataRok,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; num(Month(Date#(NAZWA_OKRESU,'MMMM YYYY'))) &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; as DataMiesiac,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; KONTO,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NAZWA_SKROCONA,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; KWOTA_WINIEN,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; KWOTA_MA&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;After selecting a month in the filter panel, I would like to get a total for the selected date and 11 months back.&lt;/STRONG&gt;&amp;nbsp;&lt;BR /&gt;What and where should I enter?&lt;/P&gt;&lt;P&gt;Magda&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 10:48:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1785718#M61259</guid>
      <dc:creator>MadKow19</dc:creator>
      <dc:date>2021-02-24T10:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: summing data for selected period</title>
      <link>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1785764#M61266</link>
      <description>&lt;P&gt;It looks like your month field,&amp;nbsp;DataMiesiac only returns the month number, regardless of the year.&amp;nbsp; Is that the month field in your filter pane?&amp;nbsp; If so, how do you know what year is being selected?&lt;/P&gt;&lt;P&gt;If you are filtering the date via the DATA field, you could add the following criteria to the set analysis of each sum() limit to the previous 11 months of the selected date:&lt;/P&gt;&lt;P&gt;In each sum statement, add the following criteria to your set analysis:&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA={"&amp;lt;=$(=max(DATA))&amp;gt;=$(=AddMonths('$(=max(DATA))',-11))"}&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;DATA={"&amp;lt;=$(=max(DATA))&amp;gt;=$(=AddMonths('$(=max(DATA))',-11))"},KONTO={"701*", "702*", "705*", "706*"}&amp;gt;} (KWOTA_MA))&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 12:25:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1785764#M61266</guid>
      <dc:creator>GaryGiles</dc:creator>
      <dc:date>2021-02-24T12:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: summing data for selected period</title>
      <link>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1789592#M61695</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thank you for your reply. I took your solutions to my applications and it doesn't work.&lt;/P&gt;&lt;P&gt;I used the DATE field in the filtering.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the problem is in the DATE field. It is somehow the difference between filtering the DATE field and the DATA field in my table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found another statement:&lt;/P&gt;&lt;P&gt;sum({&amp;lt; PeriodFilter=, [Period ID]={"&amp;gt;=$(=max([Period ID])-12)&amp;lt;=$(=max([Period ID]))"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;but I don't know where I have Period ID or PeriodFilter field&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 13:03:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1789592#M61695</guid>
      <dc:creator>MadKow19</dc:creator>
      <dc:date>2021-03-09T13:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: summing data for selected period</title>
      <link>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1789901#M61715</link>
      <description>&lt;P&gt;Do you have a calander table in your model, if you so you should add a calculated flag column for your period you want, i mean a colomn which contains 1 if the date is in 11 months then you can use that flag in your expression&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 06:44:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1789901#M61715</guid>
      <dc:creator>berkarmagan</dc:creator>
      <dc:date>2021-03-10T06:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: summing data for selected period</title>
      <link>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1790365#M61745</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;yes, in my app I have calendar for field DATA, and sorry,&amp;nbsp; I don't know what is flag column. Where I have to put in on. How to create it?&amp;nbsp; I'm new one in Qlik family &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 07:28:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1790365#M61745</guid>
      <dc:creator>MadKow19</dc:creator>
      <dc:date>2021-03-11T07:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: summing data for selected period</title>
      <link>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1790368#M61746</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;For example in your calendar table just create a new column like;&lt;/P&gt;&lt;P&gt;IF(Date&amp;gt;=MonthStart(Today(1)-365),1,0) AS [Flag 12 months],&lt;/P&gt;&lt;P&gt;It will return you as 1 or 0; and you can use this Flag column in your set expression like ; sum({&amp;lt;[Flag 12 months] = 1, Date = , Year =, Month = &amp;gt;}Sales), this provides you to get last 12 months total sales.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 07:42:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1790368#M61746</guid>
      <dc:creator>berkarmagan</dc:creator>
      <dc:date>2021-03-11T07:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: summing data for selected period</title>
      <link>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1790389#M61755</link>
      <description>&lt;P&gt;I must do something wrong. I used&amp;nbsp; your solution in calander tabele and in set analyst. It dosen't work.&lt;/P&gt;&lt;P&gt;When I don't choose date in filtering field I have sum for everymonths, but when I choose filtering field in for example Febuary 2021 I have only for this months &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 08:39:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1790389#M61755</guid>
      <dc:creator>MadKow19</dc:creator>
      <dc:date>2021-03-11T08:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: summing data for selected period</title>
      <link>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1790394#M61756</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Did you add these red fields; sum({&amp;lt;[Flag 12 months] = 1&lt;FONT color="#FF0000"&gt;, Date = , Year =, Month =&lt;/FONT&gt; &amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Because if you didnt add, the expression goes like, ok calculation filtered by your flag, but when you pick a selection on the front side, it will also effect your calculation. So you should add fields in your set expression as above which you dont want to make effect to your calculation. In this scenerio I think you should add fields related to your calendar&amp;nbsp;except your flag field.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 08:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1790394#M61756</guid>
      <dc:creator>berkarmagan</dc:creator>
      <dc:date>2021-03-11T08:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: summing data for selected period</title>
      <link>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1790436#M61763</link>
      <description>&lt;P&gt;of course,&lt;/P&gt;&lt;P&gt;&lt;U&gt;in calendar table I have:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;[autoCalendar]:&lt;BR /&gt;DECLARE FIELD DEFINITION Tagged ('$date')&lt;BR /&gt;FIELDS&lt;/P&gt;&lt;P&gt;(...)&lt;/P&gt;&lt;P&gt;&lt;FONT color="#993300"&gt;IF(Date&amp;gt;=MonthStart(Today(1)-365),1,0) AS [Flag12months];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;DERIVE FIELDS FROM FIELDS [DATA] USING [autoCalendar] ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;in set analyst;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#993300"&gt;sum({&amp;lt;[Flag12months] = 1, Date = , Year =, Month =, KONTO={"701*"} &amp;gt;}KWOTA_MA)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;my table:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;NUMER_ROKU,&lt;BR /&gt;NUMER_OKRESU,&lt;BR /&gt;NUMER_ROKU &amp;amp; '-' &amp;amp; NUMER_OKRESU AS Numer_Roku_Okresu,&lt;BR /&gt;NAZWA_OKRESU,&lt;BR /&gt;Date(Date#(NAZWA_OKRESU,'MMMM YYYY'),'YYYY-MMMM') as DATA,&lt;BR /&gt;KONTO,&lt;BR /&gt;KWOTA_WINIEN,&lt;BR /&gt;KWOTA_MA,&lt;/P&gt;&lt;P&gt;(...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 10:14:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1790436#M61763</guid>
      <dc:creator>MadKow19</dc:creator>
      <dc:date>2021-03-11T10:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: summing data for selected period</title>
      <link>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1796030#M62433</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I found problem with Flag 12 months in my app and I correct it. Thanke for help.&lt;/P&gt;&lt;P&gt;Now I have another one. In your set expression: sum({&amp;lt;[Flag 12 months] = 1, Date = , Year =, Month = &amp;gt;}Sales) I want to add next data restriction&lt;BR /&gt;sum({&amp;lt;KONTO ={"701*"}, [Flag12monthsMK] = 1, Date = , Year =, Month = &amp;gt;}KWOTA_MA)&lt;/P&gt;&lt;P&gt;Is it correct?&lt;BR /&gt;This solution show value only for pick up month, no for 12.&lt;BR /&gt;But when I use only that one sum({&amp;lt; [Flag12monthsMK] = 1, Date = , Year =, Month = &amp;gt;}KWOTA_MA) is sum 12 months but for all posibility.&lt;/P&gt;&lt;P&gt;How to add next data restriction?&lt;/P&gt;&lt;P&gt;Magda&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 13:18:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/summing-data-for-selected-period/m-p/1796030#M62433</guid>
      <dc:creator>MadKow19</dc:creator>
      <dc:date>2021-03-31T13:18:57Z</dc:date>
    </item>
  </channel>
</rss>

