<?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: Multiple date selection for KPI in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1893068#M73639</link>
    <description>&lt;P&gt;Yes, because GetFieldSelections() will generate a string. that consosts of the monthname and the pipe ('|') as seperatpr. Your &lt;STRONG&gt;Date_LastActivityAt&lt;/STRONG&gt; field seems to be a date. so you try to compare "01.01.2020" with "Jan|Feb|Mar" -&amp;gt; of cause ther are no results.&lt;BR /&gt;&lt;BR /&gt;id on't excactly understood want you are looking for but i would guess to use the same procedure as for the other KPI: &lt;EM&gt;count( {$&amp;lt;Date_LastActivityAt = {"&amp;gt;=01.10.2021 &amp;lt; 31.12.2021"}&amp;gt;}Id)&lt;/EM&gt;&amp;nbsp; //hard coded.&lt;BR /&gt;which leads to the same variables &lt;BR /&gt;&lt;EM&gt;count( {$&amp;lt;Date_LastActivityAt =&lt;/EM&gt;&lt;EM&gt;{"&amp;gt;=$(vGetFirstPrevMonth) &amp;lt;$(vGetLastPrevMonth))"}&amp;gt;} Id)&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Feb 2022 12:21:54 GMT</pubDate>
    <dc:creator>chris_djih</dc:creator>
    <dc:date>2022-02-15T12:21:54Z</dc:date>
    <item>
      <title>Multiple date selection for KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892350#M73549</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;As per my current scenario, my KPI's are displaying (Current - previous month) in %. But users are expecting if they select Multiple months like 3 months(Quarter) and 6 months(Half Yearly) then how i can change the calculation.&lt;/P&gt;
&lt;P&gt;For example - If user select Dec21, Nov21, Oct21 then in KPI it should select ((dec21 + Nov21, Oct21) - (Sept21 + Aug21+July21)).&lt;/P&gt;
&lt;P&gt;Same case for Half yearly.&lt;/P&gt;
&lt;P&gt;Can anyone help here&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Sumit&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 05:44:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892350#M73549</guid>
      <dc:creator>Sumit2504</dc:creator>
      <dc:date>2022-02-14T05:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date selection for KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892569#M73570</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/133606"&gt;@Sumit2504&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;I kind of got your challenge solved by using some variables (for better overview):&lt;BR /&gt;vGetMonthSelectionCount: &amp;nbsp;&amp;nbsp; &lt;EM&gt;=SubStringCount(GetFieldSelections(Date.Month,'|'),'|')+1&lt;/EM&gt;&lt;BR /&gt;This one calculates how many months are selected.&lt;BR /&gt;vGetFirstPrevMonth: &amp;nbsp; &amp;nbsp;&lt;EM&gt;&amp;nbsp; =AddMonths(MonthStart(Max(Date)),-2*$(vGetMonthSelectionCount)+1)&lt;/EM&gt;&lt;BR /&gt;vGetLastPrevMonth: &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;EM&gt;=AddMonths(MonthStart(Max(Date)),-$(vGetMonthSelectionCount)+1)&lt;/EM&gt;&lt;BR /&gt;These two variables give me the dates to form the correct Set-Analysis:&lt;BR /&gt;&lt;EM&gt;Sum({&amp;lt;Date={"&amp;gt;=$(vGetFirstPrevMonth) &amp;lt;$(vGetLastPrevMonth))"}&amp;gt;} [Turnover])&lt;/EM&gt; &lt;BR /&gt;&lt;BR /&gt;In practice: When I select Jan,Feb,Mar the variables will be calculated as follows:&lt;BR /&gt;vGetMonthSelectionCount = 3&lt;BR /&gt;vGetFirstPrevMonth = 01.10.2021&lt;BR /&gt;vGetLastPrevMonth = 01.01.2022&lt;/P&gt;
&lt;P&gt;So the final Set-Analysis resolved to: Sum({&amp;lt;Date={"&amp;gt;=01.10.2021 &amp;lt;01.01.2022" }&amp;gt;} Turnover).&lt;BR /&gt;Giving me all the turnover between 01.10.2021 and 31.12.2021 which is Okt,Nov,Dez.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 14:22:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892569#M73570</guid>
      <dc:creator>chris_djih</dc:creator>
      <dc:date>2022-02-14T14:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date selection for KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892690#M73592</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/151946"&gt;@chris_djih&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your response, is there a way that we can automate the number of month selection made by user.&lt;/P&gt;
&lt;P&gt;For example, user can select 4 or 5 or 6 months and he can get the data for respective (selection - previous) months?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 17:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892690#M73592</guid>
      <dc:creator>Sumit2504</dc:creator>
      <dc:date>2022-02-14T17:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date selection for KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892848#M73609</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/151946"&gt;@chris_djih&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;How to show the range for selected months ?&lt;/P&gt;
&lt;P&gt;i.e&amp;nbsp;&lt;SPAN&gt;Sum({&amp;lt;Date={"&amp;gt;=01.01.2022 =&amp;lt;31.03.2022" }&amp;gt;} Turnover).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 06:25:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892848#M73609</guid>
      <dc:creator>Sumit2504</dc:creator>
      <dc:date>2022-02-15T06:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date selection for KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892873#M73610</link>
      <description>&lt;P&gt;What do you mean with automate the number of month selection?&lt;/P&gt;
&lt;P&gt;it is aleady fully dynamic, it works if you select 1,2,3,4,5 or any number of months, thanks to the &lt;BR /&gt;vGetMonthSelectionCount variable.&lt;BR /&gt;&lt;BR /&gt;to show the selected month simply use &lt;EM&gt;GetFieldSelections(Date.Month,'|').&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 07:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892873#M73610</guid>
      <dc:creator>chris_djih</dc:creator>
      <dc:date>2022-02-15T07:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date selection for KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892912#M73619</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/151946"&gt;@chris_djih&lt;/a&gt;&amp;nbsp;- Thank you for your help and support&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 08:38:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892912#M73619</guid>
      <dc:creator>Sumit2504</dc:creator>
      <dc:date>2022-02-15T08:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date selection for KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892964#M73627</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/151946"&gt;@chris_djih&lt;/a&gt;&amp;nbsp;- I want to show selected months in set analysis&lt;EM&gt;. &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I have stored&amp;nbsp;GetFieldSelections(Date.Month,'|') in variable&amp;nbsp;&lt;STRONG&gt;vCurrentMonthSelection.&amp;nbsp;&lt;/STRONG&gt;and then trying to use&amp;nbsp;count( {$&amp;lt;Date_LastActivityAt = {$(vCurrentMonthSelection)}&amp;gt;}Id) but it's not showing any results.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Can you please help here&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 09:52:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1892964#M73627</guid>
      <dc:creator>Sumit2504</dc:creator>
      <dc:date>2022-02-15T09:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date selection for KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1893068#M73639</link>
      <description>&lt;P&gt;Yes, because GetFieldSelections() will generate a string. that consosts of the monthname and the pipe ('|') as seperatpr. Your &lt;STRONG&gt;Date_LastActivityAt&lt;/STRONG&gt; field seems to be a date. so you try to compare "01.01.2020" with "Jan|Feb|Mar" -&amp;gt; of cause ther are no results.&lt;BR /&gt;&lt;BR /&gt;id on't excactly understood want you are looking for but i would guess to use the same procedure as for the other KPI: &lt;EM&gt;count( {$&amp;lt;Date_LastActivityAt = {"&amp;gt;=01.10.2021 &amp;lt; 31.12.2021"}&amp;gt;}Id)&lt;/EM&gt;&amp;nbsp; //hard coded.&lt;BR /&gt;which leads to the same variables &lt;BR /&gt;&lt;EM&gt;count( {$&amp;lt;Date_LastActivityAt =&lt;/EM&gt;&lt;EM&gt;{"&amp;gt;=$(vGetFirstPrevMonth) &amp;lt;$(vGetLastPrevMonth))"}&amp;gt;} Id)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 12:21:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1893068#M73639</guid>
      <dc:creator>chris_djih</dc:creator>
      <dc:date>2022-02-15T12:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date selection for KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1893089#M73643</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/151946"&gt;@chris_djih&lt;/a&gt;&amp;nbsp; - Yes, &lt;STRONG&gt;Date_LastActivityAt&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;is a date field with DD/MM/YYYY.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Can you help me with expression which can be used to create&amp;nbsp;&lt;EM&gt;vGetFirstPrevMonth and&amp;nbsp;vGetLastPrevMonth for Current selections.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 12:43:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1893089#M73643</guid>
      <dc:creator>Sumit2504</dc:creator>
      <dc:date>2022-02-15T12:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date selection for KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1893100#M73647</link>
      <description>&lt;P&gt;i already have mentioned everything in the first post.&lt;BR /&gt;of Cause you have to replace "&lt;EM&gt;Date.Month&lt;/EM&gt;" with the field name of your data model, which containts the information of the month.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 12:51:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-date-selection-for-KPI/m-p/1893100#M73647</guid>
      <dc:creator>chris_djih</dc:creator>
      <dc:date>2022-02-15T12:51:33Z</dc:date>
    </item>
  </channel>
</rss>

