<?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: Comparison with previous month data issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047890#M925817</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then I guess you should do that in script instead of front end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if you do in script you may loose flexibility of getting results for different months.&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>Mon, 04 Apr 2016 12:21:46 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2016-04-04T12:21:46Z</dc:date>
    <item>
      <title>Comparison with previous month data issue</title>
      <link>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047884#M925811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue while comparing this month data with previous months data.&lt;/P&gt;&lt;P&gt;I have fields like product name ,Sale ID sold and Month. For each sale there is one SaleID associated.&lt;/P&gt;&lt;P&gt;i need to compare the products items sold for each product with last months products and need to display the products under Improvement and Deterioration sections.&lt;/P&gt;&lt;P&gt;If any product has got more no.of products sold when compared to previous month it should come under improvement else it should come under deterioration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To achieve this i have taken List box and instead of field i took expression and in expression for improvement i have considered the below expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Improvement:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Aggr(Count({&amp;lt;Month={"$(=Month(Max(Date)))"},Year={"$(=Max(Year))"}SaleID),Products)&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;Aggr(Count({&amp;lt;Month={"$(=AddMonths(Month(Max(Date))),-1)"},Year={"$(=Max(Year))"}SaleID),Products),Products&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the issue is all products doesnt have sales in all months. while comparing the products comparison happening if that product have saleID's in both months other wise it is not comparing the products.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the attached app and kindly help me in comparing the products even though the product doesnt have sales.&lt;/P&gt;&lt;P&gt;In the sample app for improvement section ideally i should get A,B,D products but the above expression returning only A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047884#M925811</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison with previous month data issue</title>
      <link>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047885#M925812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried below expression and its giving the correct result&lt;/P&gt;&lt;P&gt;please try:&lt;/P&gt;&lt;P&gt;=aggr(If(Count({&amp;lt;Month={'Jan'}&amp;gt;}SaleID) &amp;gt;count({&amp;lt;Month={'Feb'}&amp;gt;}SaleID),Product),Product)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 12:00:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047885#M925812</guid>
      <dc:creator>prajuds99</dc:creator>
      <dc:date>2016-04-04T12:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison with previous month data issue</title>
      <link>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047886#M925813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find the attachment.&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>Mon, 04 Apr 2016 12:02:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047886#M925813</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2016-04-04T12:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison with previous month data issue</title>
      <link>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047887#M925814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The example you posted does not contain a date field. The Month field has only text values which can't be used to calculate the previous month.&amp;nbsp; If you have a date field you can create a numeric month field that can be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SalesDate,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(MonthStart(SalesDate),'YYYYMM') as Month&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(SalesDate)*12+Month(SalesDate) as _MonthNum&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SaleID&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....etc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select the month in the Month field. Then you can use these expressions:&lt;/P&gt;&lt;P&gt;Sales of the selected month: count(distinct SaleID)&lt;/P&gt;&lt;P&gt;Sales of the month before the selected month: count({&amp;lt;&lt;STRONG&gt;Month=, &lt;SPAN style="font-size: 13.3333px;"&gt;_MonthNum&lt;/SPAN&gt;={$(=max(&lt;SPAN style="font-size: 13.3333px;"&gt;_MonthNum&lt;/SPAN&gt;)-1)}&lt;/STRONG&gt;&amp;gt;}distinct SaleID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 12:06:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047887#M925814</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-04-04T12:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison with previous month data issue</title>
      <link>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047888#M925815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;My requirement is to display the product in listbox under improvement and detorioration sections.&lt;/P&gt;&lt;P&gt;Can you please help me with that expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 12:15:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047888#M925815</guid>
      <dc:creator />
      <dc:date>2016-04-04T12:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison with previous month data issue</title>
      <link>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047889#M925816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response. My actual requirement is to show the products under Improvement and deterioration sections&lt;/P&gt;&lt;P&gt;by comparing the data with previous months.&lt;/P&gt;&lt;P&gt;can you please help me with the expression to display &lt;SPAN style="font-size: 13.3333px;"&gt; Improvement and deterioration in separate list boxes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Ravi&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 12:17:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047889#M925816</guid>
      <dc:creator />
      <dc:date>2016-04-04T12:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison with previous month data issue</title>
      <link>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047890#M925817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then I guess you should do that in script instead of front end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if you do in script you may loose flexibility of getting results for different months.&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>Mon, 04 Apr 2016 12:21:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047890#M925817</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2016-04-04T12:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison with previous month data issue</title>
      <link>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047891#M925818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please suggest me a work around for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 12:41:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047891#M925818</guid>
      <dc:creator />
      <dc:date>2016-04-04T12:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison with previous month data issue</title>
      <link>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047892#M925819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made changes in chart and now it looks like listbox.&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>Mon, 04 Apr 2016 12:45:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparison-with-previous-month-data-issue/m-p/1047892#M925819</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2016-04-04T12:45:43Z</dc:date>
    </item>
  </channel>
</rss>

