<?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: Working with set analysis with KPI in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416675#M33488</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've tried&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;'Date.Year' = {$(=Max('Date.Year'))}&amp;gt;} [Defective Qty] )&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;Date.Year = {$(=Max(Date.Year))}&amp;gt;} [Defective Qty] )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both return the entire set total. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Dec 2017 10:50:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-12-17T10:50:15Z</dc:date>
    <item>
      <title>Working with set analysis with KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416667#M33480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I would like to set my KPI to be based on the latest year when users open up the worksheet. This will have a secondary figure which shows the value of year-1. However, I would like the figure in KPI to change based on user selection. For &lt;/SPAN&gt;example&lt;SPAN style="font-size: 10pt;"&gt; it is now 2017.&amp;nbsp; The sales figure for the sales field should sum up 2017 and show 2016 figure for comparison. If users select 2016 in the filter, the KPI should show 2016 and 2015 figures. How &lt;/SPAN&gt;can&amp;nbsp; accomplish&lt;SPAN style="font-size: 10pt;"&gt; this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am starting with this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #363636; font-family: Courier; font-style: italic; font-weight: bold;"&gt;sum( {$&amp;lt;Year = {&lt;/SPAN&gt;&lt;SPAN style="color: #363636; font-family: Courier-Bold; font-style: italic; font-weight: bold;"&gt;$(=Only(Year)-1)&lt;/SPAN&gt;&lt;SPAN style="color: #363636; font-family: Courier; font-style: italic; font-weight: bold;"&gt;}&amp;gt;} Sales )&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 18pt; color: #363636; font-family: Courier; font-style: italic; font-weight: bold;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #363636; font-family: Courier; font-style: italic; font-weight: bold;"&gt;sum( {$&amp;lt;Year = {&lt;/SPAN&gt;&lt;SPAN style="color: #363636; font-family: Courier-Bold; font-style: italic; font-weight: bold;"&gt;$(=Only(Year))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #363636; font-style: italic; font-size: 10pt; font-family: Courier; font-weight: bold;"&gt;}&amp;gt;} Sales )&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Dec 2017 05:30:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416667#M33480</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-17T05:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Working with set analysis with KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416668#M33481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should also work, but if not then try changing Only function to Max.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: bold; font-style: italic; font-family: Courier; color: #363636;"&gt;sum( {$&amp;lt;Year = {&lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; font-style: italic; font-family: Courier-Bold; color: #363636;"&gt;$(=Max(Year)-1)&lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; font-style: italic; font-family: Courier; color: #363636;"&gt;}&amp;gt;} Sales )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: bold; font-style: italic; font-family: Courier; color: #363636;"&gt;&lt;SPAN style="font-weight: bold; font-style: italic; font-family: Courier; color: #363636;"&gt;sum( {$&amp;lt;Year = {&lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; font-style: italic; font-family: Courier-Bold; color: #363636;"&gt;$(=Max(Year)-1)&lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; font-style: italic; font-family: Courier; color: #363636;"&gt;}&amp;gt;} Sales )&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #363636; font-style: italic; font-family: Courier; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #363636; font-family: Courier;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #363636; font-family: Courier;"&gt;Kaushik Solanki&lt;/SPAN&gt;&lt;SPAN style="color: #363636; font-family: Courier; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Dec 2017 05:48:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416668#M33481</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2017-12-17T05:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Working with set analysis with KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416669#M33482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on my understanding $ means current selection? hence max of the current selection?&amp;nbsp; If I use 1 instead of $,&amp;nbsp; then MAXi&amp;nbsp; is returned based on MAX of the entire data set. Am I correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Dec 2017 05:53:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416669#M33482</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-17T05:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Working with set analysis with KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416670#M33483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are right, When you use 1 it wont consider any selections. So in your case if anyone selects 2016 then also it will show 2017 and 2016 as previous year.&lt;/P&gt;&lt;P&gt;So to satisfy your requirement you should use $.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Dec 2017 06:11:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416670#M33483</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2017-12-17T06:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Working with set analysis with KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416671#M33484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kaustik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for confirming. By default, how does Qlik knows what was selected when users first open up the worksheet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Dec 2017 06:47:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416671#M33484</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-17T06:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Working with set analysis with KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416672#M33485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Qlik doesnt know default value when nothing is selected and thus we write the set analysis to tell Qlik to consider value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case if you use the Max function, it will take the maximum value from the entire data and assign it as default value, but as soon as selection is made it will recalculate the max and assign it as default value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Dec 2017 06:50:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416672#M33485</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2017-12-17T06:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Working with set analysis with KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416673#M33486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kaushik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please bear with me. It's my first 4 days using Qlik sense. I applied the codes in the KPI. If I had selected 2017, I expected 16 to be the defect found and 38.1k to be the previous year. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes both numbers remained the same. Any idea what I did wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="3.jpg" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/187226_3.jpg" style="font-size: 13.3333px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2.jpg" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/187225_2.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/187224_1.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Dec 2017 09:26:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416673#M33486</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-17T09:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Working with set analysis with KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416674#M33487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;It is because the field name you used in set analysis is wrong, it should be Date.Year, because that is the actual name of field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So change the Year to Date.Year in your set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Dec 2017 10:24:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416674#M33487</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2017-12-17T10:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Working with set analysis with KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416675#M33488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've tried&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;'Date.Year' = {$(=Max('Date.Year'))}&amp;gt;} [Defective Qty] )&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;Date.Year = {$(=Max(Date.Year))}&amp;gt;} [Defective Qty] )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both return the entire set total. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Dec 2017 10:50:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-set-analysis-with-KPI/m-p/1416675#M33488</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-17T10:50:15Z</dc:date>
    </item>
  </channel>
</rss>

