<?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: Set analysis comparison in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201152#M625745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not really sure right now, but if you can share the year selection where it isn't working I can try to dig deeper to check it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Oct 2016 16:48:34 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-10-18T16:48:34Z</dc:date>
    <item>
      <title>Set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201146#M625739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, good people from qlikview community.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some questions about set analysis. There are some calculations that seem right but it doesn't show the right answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly:&lt;/P&gt;&lt;P&gt;in my first straight table I want to compare the current month with the previous month and show the percentage of the difference between the two months:&lt;/P&gt;&lt;P&gt;But I get some strange percentages there: &lt;/P&gt;&lt;P&gt;my expression is: &lt;/P&gt;&lt;P&gt;Sum({1&amp;lt;OrderYearMonth = {$(selectedYearMonth)}&amp;gt;}LineTotal)/1000-Sum({1&amp;lt;OrderYearMonth = {$(prevYearMonth)}&amp;gt;}LineTotal)/1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just do my first expression minus the second and then show it as the percentage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly: &lt;/P&gt;&lt;P&gt;In my second pivot table I want to compare current month and the whole year. I've succeded to get information in the table about the current month but it doesn't go well with the whole year.My script is that:&lt;/P&gt;&lt;P&gt;Sum({1&amp;lt;OrderYearMonth = {$(YearSelected)}&amp;gt;}LineTotal)/1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subsequently, I do not have the right percentage here either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help and +1 for your karma.&lt;/P&gt;&lt;P&gt;Just in case, I attach my file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 19:05:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201146#M625739</guid>
      <dc:creator />
      <dc:date>2016-10-17T19:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201147#M625740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For first issue, try this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({1&amp;lt;OrderYearMonth = {$(selectedYearMonth)}&amp;gt;}LineTotal)/Sum({1&amp;lt;OrderYearMonth = {$(prevYearMonth)}&amp;gt;}LineTotal)-1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/140898_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 19:11:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201147#M625740</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-17T19:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201148#M625741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot, it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 19:16:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201148#M625741</guid>
      <dc:creator />
      <dc:date>2016-10-17T19:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201149#M625742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check for second requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/140899_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 19:20:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201149#M625742</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-17T19:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201150#M625743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it works partly.&lt;/P&gt;&lt;P&gt;It doesn't show correct data for SelectedYear variable.When you click on another year it still shows the same data.&lt;/P&gt;&lt;P&gt;What could I do with it so it shows me the right data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it have anything to do with my variable SelectedYear?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 14:39:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201150#M625743</guid>
      <dc:creator />
      <dc:date>2016-10-18T14:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201151#M625744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also want to paint the difference table red and bold if they reach 1/12 percent difference.&lt;/P&gt;&lt;P&gt;=if(Sum({1&amp;lt;OrderYearMonth = {$(selectedYearMonth)}&amp;gt;}LineTotal)/Sum({1&amp;lt;OrderYearMonth = {$(YearSelected)}, OrderYearMonth&amp;gt;}LineTotal) - 1) &amp;lt; 8.3, RGB(255, 128, 128))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It says me that the last part of my script is not right. What could it be there?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 14:49:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201151#M625744</guid>
      <dc:creator />
      <dc:date>2016-10-18T14:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201152#M625745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not really sure right now, but if you can share the year selection where it isn't working I can try to dig deeper to check it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 16:48:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201152#M625745</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-18T16:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201153#M625746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YearSelected= =year(MaxSelectedOrderDate)&lt;/P&gt;&lt;P&gt;it looks like that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;just in case another one:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;MaxSelectedOrderDate&lt;/SPAN&gt;=max({$}OrderDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not understand why it always stays the same. It always shows the data from the year 2014&lt;/P&gt;&lt;P&gt;Maybe it ha to do with m&lt;SPAN style="font-size: 13.3333px;"&gt;ax({$}OrderDate)? and it shows the max year but then I do not know the way to find the selected year? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 17:29:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201153#M625746</guid>
      <dc:creator />
      <dc:date>2016-10-18T17:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201154#M625747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I was using the incorrect field in the set analysis filter. I was using OrderYearMonth instead of OrderYear. Changing that seems to have helped. Check it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({1&amp;lt;&lt;SPAN style="color: #ff0000;"&gt;OrderYear&lt;/SPAN&gt; = {$(YearSelected)}, OrderYearMonth&amp;gt;}LineTotal)/1000&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 19:21:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201154#M625747</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-18T19:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201155#M625748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These are the variables I use to solve something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maxSelectedOrderDate= max(OrderDate)&lt;/P&gt;&lt;P&gt;YearSelected= year(maxSelectedOrderDate)&lt;/P&gt;&lt;P&gt;MonthSelected= Month (maxSelectedOrderDate)&lt;/P&gt;&lt;P&gt;selectedYearMonth= YearSelected*100 + MonthSelected&lt;/P&gt;&lt;P&gt;prevYearMonth= YearSelected*100 + if(MonthSelected&amp;gt;1, MonthSelected-1, -88)&lt;/P&gt;&lt;P&gt;selectedMonthYear= Date (maxSelectedOrderDate, 'MMM-YYYY')&lt;/P&gt;&lt;P&gt;prevMonthYear= Date (Monthstart (maxSelectedOrderDate -1, 'MMM-YYYY')&lt;/P&gt;&lt;P&gt;prevYearSelected= YearSelected - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expression selectedMonthYear =num(sum({1&amp;lt;OrderYearMonth = {$(selectedYearMonth)}&amp;gt;} LineTotal)/1000, '$###0;($###0)')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expression prevMonthYear =num(sum({1&amp;lt;OrderYearMonth = {$(prevYearMonth)}&amp;gt;} LineTotal)/1000, '$###0;($###0)')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expression difference =num((sum({1&amp;lt;OrderYearMonth = {$(selectedYearMonth)}&amp;gt;} LineTotal)-sum({1&amp;lt;OrderYearMonth = {$(prevYearMonth)}&amp;gt;} LineTotal))/sum({1&amp;lt;OrderYearMonth = {$(prevYearMonth)}&amp;gt;} LineTotal), '#%;(#%)')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helped you out!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2016 11:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201155#M625748</guid>
      <dc:creator />
      <dc:date>2016-11-03T11:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201156#M625749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Merci, Evi &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2016 18:37:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-comparison/m-p/1201156#M625749</guid>
      <dc:creator />
      <dc:date>2016-11-03T18:37:37Z</dc:date>
    </item>
  </channel>
</rss>

