<?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: KPI for last quarter in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730297#M55688</link>
    <description>&lt;P&gt;OK I think I understand.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try something like this then:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;'Q'&amp;amp;Ceil(month(QuarterName(today(),[&lt;SPAN&gt;QuartersAgo]&lt;/SPAN&gt;))/3)&amp;amp;'-'&amp;amp; year(QuarterName(today(),[&lt;SPAN&gt;QuartersAgo]&lt;/SPAN&gt;))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jul 2020 13:18:51 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2020-07-23T13:18:51Z</dc:date>
    <item>
      <title>KPI for last quarter</title>
      <link>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730161#M55673</link>
      <description>&lt;P&gt;&lt;EM&gt;Hello,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I want to add a KPI or Multi KPI chart to display a measure for the last quarter only. I manage to use quarter as dimension in the multi KPI but then I get all quarters, I want only the last. How can I solve this?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 07:20:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730161#M55673</guid>
      <dc:creator>alexanderdafflitto</dc:creator>
      <dc:date>2020-07-23T07:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: KPI for last quarter</title>
      <link>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730173#M55674</link>
      <description>&lt;P&gt;What is your definition of last quarter?&lt;/P&gt;&lt;P&gt;If you where to look today, July 23, are you expecting to see Q2 (Apr-Jun) or are you expecting Q3 (Jul-Sep)?&lt;/P&gt;&lt;P&gt;Should the last quarter change dynamicly based on periods in your selections or should it only be locked to the current last quarter (using today as base)?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 08:25:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730173#M55674</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-23T08:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: KPI for last quarter</title>
      <link>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730176#M55675</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;today I would like to see the quarter Apr - Jun, displayed as Q2-2020 for example. It would not be changed by filter, always fixed to the last quarter.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 08:35:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730176#M55675</guid>
      <dc:creator>alexanderdafflitto</dc:creator>
      <dc:date>2020-07-23T08:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: KPI for last quarter</title>
      <link>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730177#M55676</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/121042"&gt;@alexanderdafflitto&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please clarify, whether you wants to display the present quarter of the selected date or the last quarter of the year(Q4).&lt;/P&gt;&lt;P&gt;1. For Present Quarter:&lt;/P&gt;&lt;P&gt;Try using the set as:&lt;/P&gt;&lt;P&gt;Ex - sum({&amp;lt;Date={"&amp;gt;=$(=QuarterStart(Max(Date)))&amp;lt;=$(=Max(Date))"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. For Last Quarter of the year:&lt;/P&gt;&lt;P&gt;Create a column as Quarter in backend using the following Master calendar scripts&lt;/P&gt;&lt;P&gt;MinMax:&lt;BR /&gt;LOAD&lt;BR /&gt;Min(DATE) as MinDate,&lt;BR /&gt;Max(DATE) as MaxDate&lt;BR /&gt;Resident Table;&lt;/P&gt;&lt;P&gt;Let vDateMin = Num(Peek('MinDate',0,'MinMax'));&lt;BR /&gt;Let vDateMax =Num(Peek('MaxDate',0,'MinMax'));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Master Calendar:&lt;/P&gt;&lt;P&gt;Load *,&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Q' &amp;amp; Ceil([Month (#)] / 3) as Quarter;&lt;/P&gt;&lt;P&gt;Load&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date($(vDateMin) + IterNo() - 1, '$(DateFormat)') as Date,&lt;/P&gt;&lt;P&gt;Month($(vDateMin) + IterNo() - 1) as Month,&lt;/P&gt;&lt;P&gt;Num(Month($(vDateMin) + IterNo() - 1), '00') as [Month (#)]&lt;/P&gt;&lt;P&gt;AUTOGENERATE 1&lt;BR /&gt;WHILE $(vDateMin)+IterNo()-1&amp;lt;= $(vDateMax);&lt;BR /&gt;&lt;BR /&gt;DROP Table MinMax;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then In Set Analysis:&lt;/P&gt;&lt;P&gt;Ex - sum({&amp;lt;Quarter={'Q4'}&amp;gt;}Sales)&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 08:35:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730177#M55676</guid>
      <dc:creator>sugisense</dc:creator>
      <dc:date>2020-07-23T08:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: KPI for last quarter</title>
      <link>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730179#M55677</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to see the last quarter before the current. So for example, today I would like to see Q2 of 2020.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Alexander&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 08:41:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730179#M55677</guid>
      <dc:creator>alexanderdafflitto</dc:creator>
      <dc:date>2020-07-23T08:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: KPI for last quarter</title>
      <link>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730180#M55678</link>
      <description>&lt;P&gt;Asssuming your orignal expression is Sum(Amount) and you have the following calender dimensions: Year, Month, Quarter and Date. Then your set could look like this.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;sum({&amp;lt; Year, Month, Quarter, Date= {"&amp;gt;=$(=QuarterStart(today(),-1))&amp;lt;$(=QuarterEnd(today(),-1))"}&amp;gt;}Amount) &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use this expression on this data model as an example:&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;SET DateFormat='YYYY-MM-DD';
Table:
LOAD *, 
  Dual('Q' &amp;amp; ceil(month(Date)/3)&amp;amp;'-'&amp;amp; year(Date),quartername(Date)) as Quarter , 
  Year(Date) as Year ,
  Month(Date) as Month
Inline [
RowID, 	Date,  	  	Amount
001, 	2019-01-01,	101
002, 	2019-01-01,	102
003,	2019-06-16,	103
004,	2019-06-30,	104
005, 	2019-02-01,	105
006,    2020-03-15,	106
007,    2020-04-10,	107
008,	2020-05-17,	108
009,	2020-07-01,	109
010, 	2020-01-01,	110
011, 	2020-01-01,	111
012,	2020-06-16,	112
013,	2020-06-30,	113
014, 	2020-02-01,	114
015, 	2019-12-24,	115
016, 	2019-11-08,	116
017, 	2019-10-02,	117
];&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 23 Jul 2020 08:49:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730180#M55678</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-23T08:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: KPI for last quarter</title>
      <link>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730248#M55681</link>
      <description>&lt;P&gt;Thanks. This seems to advance for my needs. Basically what I need is a way to format the dimension QuartersAgo so that I can see the actual quarter, not just -1 (for last quarter) or 0 for current quarter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now have a multi KPI with the last quarter as well as the current, but the labels are -1 and 0. Any way around this?&lt;/P&gt;&lt;P&gt;Alexander&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 11:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730248#M55681</guid>
      <dc:creator>alexanderdafflitto</dc:creator>
      <dc:date>2020-07-23T11:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: KPI for last quarter</title>
      <link>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730297#M55688</link>
      <description>&lt;P&gt;OK I think I understand.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try something like this then:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;'Q'&amp;amp;Ceil(month(QuarterName(today(),[&lt;SPAN&gt;QuartersAgo]&lt;/SPAN&gt;))/3)&amp;amp;'-'&amp;amp; year(QuarterName(today(),[&lt;SPAN&gt;QuartersAgo]&lt;/SPAN&gt;))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 13:18:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730297#M55688</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-23T13:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: KPI for last quarter</title>
      <link>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730309#M55690</link>
      <description>Where do I put that code?&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Jul 2020 13:35:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730309#M55690</guid>
      <dc:creator>alexanderdafflitto</dc:creator>
      <dc:date>2020-07-23T13:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: KPI for last quarter</title>
      <link>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730346#M55693</link>
      <description>&lt;P&gt;You could put it in the script where you have the Quartes ago field.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&lt;SPAN&gt;=IF(not isnull(QuartersAgo),'Q'&amp;amp;Ceil(month(QuarterName(today(),[QuartersAgo]))/3)&amp;amp;'-'&amp;amp; year(QuarterName(today(),[QuartersAgo]))) as [QuarterField]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Or you could create a custom field in your chart dimension using the definition&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&lt;SPAN&gt;=IF(not isnull(QuartersAgo),'Q'&amp;amp;Ceil(month(QuarterName(today(),[QuartersAgo]))/3)&amp;amp;'-'&amp;amp; year(QuarterName(today(),[QuartersAgo])))&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Notice I put a If(not isnull() ...) around it, realised that without it you will get a 'Q' where you don't have a QuarterAgo value.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 14:59:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730346#M55693</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-23T14:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: KPI for last quarter</title>
      <link>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730394#M55698</link>
      <description>&lt;P&gt;I don’t seem to be able to use set analysis in the multi KPI chart?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 17:34:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/KPI-for-last-quarter/m-p/1730394#M55698</guid>
      <dc:creator>alexanderdafflitto</dc:creator>
      <dc:date>2020-07-23T17:34:30Z</dc:date>
    </item>
  </channel>
</rss>

