<?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 Help to build a KPI in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Help-to-build-a-KPI/m-p/1602258#M44581</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;i'm new in Qlik and i have some problem to create different KPI's&lt;/P&gt;&lt;P&gt;I need to build something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dashboard.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/15430i3E2ECE6AAEA5AF02/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dashboard.PNG" alt="dashboard.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've tried with differents formulas but it doesn't work properly.&lt;/P&gt;&lt;P&gt;In each KPI, i need the total sales per Week, Month, Quarter and Year with the actual date and the comparison with the same Week, month, quarter and year from last year.&lt;/P&gt;&lt;P&gt;Thank you for your answers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jul 2019 10:35:28 GMT</pubDate>
    <dc:creator>AntonioSM</dc:creator>
    <dc:date>2019-07-15T10:35:28Z</dc:date>
    <item>
      <title>Help to build a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Help-to-build-a-KPI/m-p/1602258#M44581</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;i'm new in Qlik and i have some problem to create different KPI's&lt;/P&gt;&lt;P&gt;I need to build something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dashboard.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/15430i3E2ECE6AAEA5AF02/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dashboard.PNG" alt="dashboard.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've tried with differents formulas but it doesn't work properly.&lt;/P&gt;&lt;P&gt;In each KPI, i need the total sales per Week, Month, Quarter and Year with the actual date and the comparison with the same Week, month, quarter and year from last year.&lt;/P&gt;&lt;P&gt;Thank you for your answers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 10:35:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-to-build-a-KPI/m-p/1602258#M44581</guid>
      <dc:creator>AntonioSM</dc:creator>
      <dc:date>2019-07-15T10:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help to build a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Help-to-build-a-KPI/m-p/1602639#M44609</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you have a calendar, create some indicators for the current week/month/quarter and year. Then you can use formulas like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({$&amp;lt; _indCurrentWeek = {1}&amp;gt;}Sales)
Sum({$&amp;lt; _indCurrentMonth = {1}&amp;gt;}Sales)
Sum({$&amp;lt; _indCurrentQuarter = {1}&amp;gt;}Sales)
Sum({$&amp;lt; _indCurrentYear = {1}&amp;gt;}Sales)&lt;/LI-CODE&gt;&lt;P&gt;And for the previous year:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({$&amp;lt; _indLYWeek = {1}&amp;gt;}Sales)
Sum({$&amp;lt; _indLYMonth = {1}&amp;gt;}Sales)
Sum({$&amp;lt; _indLYQuarter = {1}&amp;gt;}Sales)
Sum({$&amp;lt; _indLYYear = {1}&amp;gt;}Sales)&lt;/LI-CODE&gt;&lt;P&gt;Jordy&lt;/P&gt;&lt;P&gt;Climber&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 09:54:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-to-build-a-KPI/m-p/1602639#M44609</guid>
      <dc:creator>JordyWegman</dc:creator>
      <dc:date>2019-07-16T09:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help to build a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Help-to-build-a-KPI/m-p/1602727#M44617</link>
      <description>&lt;P&gt;Hi Jordy,&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;I have a calendar but i don't know how to create the indicators for the current&amp;nbsp;&lt;SPAN&gt;week/month/quarter and year.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My calendar is :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;QuartersMap:&lt;BR /&gt;MAPPING LOAD&lt;BR /&gt;rowno() as Mes,&lt;BR /&gt;'T' &amp;amp; Ceil (rowno()/3) as Trimestre&lt;BR /&gt;AUTOGENERATE (12);&lt;BR /&gt;&lt;BR /&gt;Temp:&lt;BR /&gt;Load&lt;BR /&gt;min(FechaVenta) as FechaMin,&lt;BR /&gt;max(FechaVenta) as FechaMax&lt;BR /&gt;Resident TiendasVentasComprasStock_261;&lt;BR /&gt;&lt;BR /&gt;Let varFechaMin = Num(Peek('FechaMin', 0, 'Temp'));&lt;BR /&gt;Let varFechaMax = Num(Peek('FechaMax', 0, 'Temp'));&lt;BR /&gt;DROP Table Temp;&lt;BR /&gt;&lt;BR /&gt;TempCalendar:&lt;BR /&gt;LOAD&lt;BR /&gt;$(varFechaMin) + Iterno()-1 As Num,&lt;BR /&gt;Date($(varFechaMin) + IterNo() - 1) as TempDate&lt;BR /&gt;AutoGenerate 1 While $(varFechaMin) + IterNo() -1 &amp;lt;= $(varFechaMax);&lt;BR /&gt;&lt;BR /&gt;MasterCalendar:&lt;BR /&gt;Load&lt;BR /&gt;TempDate AS FechaVenta,&lt;BR /&gt;Day(TempDate) As Dia,&lt;BR /&gt;week(TempDate) As Semana,&lt;BR /&gt;Month(TempDate) As Mes,&lt;BR /&gt;Year(TempDate) As Año,&lt;BR /&gt;ApplyMap('QuartersMap', month(TempDate), Null()) as Trimestre,&lt;BR /&gt;Week(weekstart(TempDate)) &amp;amp; '-' &amp;amp; WeekYear(TempDate) as SemanaAño,&lt;BR /&gt;WeekDay(TempDate) as SemanaDia&lt;BR /&gt;Resident TempCalendar&lt;BR /&gt;Order By TempDate ASC;&lt;BR /&gt;Drop Table TempCalendar;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How should I to add the indicators that I need?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you again.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 13:09:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-to-build-a-KPI/m-p/1602727#M44617</guid>
      <dc:creator>AntonioSM</dc:creator>
      <dc:date>2019-07-16T13:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help to build a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Help-to-build-a-KPI/m-p/1602734#M44618</link>
      <description>&lt;P&gt;Hi Antonio,&lt;/P&gt;&lt;P&gt;You should first create a vToday:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let vToday = Today();

let vCY = year($(vToday));

let vCM = num(month($(vToday)));&lt;/LI-CODE&gt;&lt;P&gt;Then use this in your Master Calendar:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// year
    if(year(Date)=$(vCY), 1, 0)	as _indCY,
    if(year(Date)=$(vLY), 1, 0)	as _indLY,
// month
    if(month(Date)=$(vCM), 1, 0) as _indCM,
    if(month(Date)=$(vLM), 1, 0) as _indLM,
// week
	if(weekyear(Date) &amp;amp; '-' &amp;amp; right('00' &amp;amp; week(Date),2) =
    	weekyear($(vToday)) &amp;amp; '-' &amp;amp; right('00' &amp;amp; week($(vToday)),2),
        1,0)																as _indCW,
	if(weekyear(Date) &amp;amp; '-' &amp;amp; right('00' &amp;amp; week(Date),2) =
    	weekyear($(vToday)-7) &amp;amp; '-' &amp;amp; right('00' &amp;amp; week($(vToday)-7),2),
        1,0)																as _indLW,&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Jordy&lt;/P&gt;&lt;P&gt;Climber&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 13:21:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-to-build-a-KPI/m-p/1602734#M44618</guid>
      <dc:creator>JordyWegman</dc:creator>
      <dc:date>2019-07-16T13:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help to build a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Help-to-build-a-KPI/m-p/1603061#M44632</link>
      <description>&lt;P&gt;Hi Jordy,&lt;/P&gt;&lt;P&gt;you are really helping me but i have found some problems doing the indicators.&lt;/P&gt;&lt;P&gt;The script works and load the dates but when i check the MasterCalendar all the indicators are 0.&lt;/P&gt;&lt;P&gt;Do you know why?&lt;/P&gt;&lt;P&gt;Maybe is something easy but i'm learning now how to use QlikSense and at the moment i don't know to solve it.&lt;/P&gt;&lt;P&gt;Thank you again for your help &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;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="creacionindicadores.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/15558i6885612BFCAB98C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="creacionindicadores.PNG" alt="creacionindicadores.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 08:46:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-to-build-a-KPI/m-p/1603061#M44632</guid>
      <dc:creator>AntonioSM</dc:creator>
      <dc:date>2019-07-17T08:46:26Z</dc:date>
    </item>
  </channel>
</rss>

