<?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 Set Analysis on previous month help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-previous-month-help/m-p/435693#M162506</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;im using the following expression to set the colour of a text box depending on a score :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(num(sum(score)/sum([Score Target]))=1,RGB(0,255,0),&lt;/P&gt;&lt;P&gt; if(num(sum(score)/sum([Score Target]))=0,RGB(255,128,0),RGB(255,0,0)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is working fine.&amp;nbsp; What I need to try and do is create three more text boxes to show the colour rating of previous months scores eg, For last month show a coloured textbox for April, A coloured text box for March and a coloured Text Box for February.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I basically need to know the three previous months trend (1 coloured text box for each previous month).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dates within my data model are&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="40715" class="jive-image" alt="dates.jpg" src="https://community.qlik.com/legacyfs/online/40715_dates.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if my initial If statement can be simplified in anyway using set analysis - that would be a great help too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fiorano&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 May 2013 15:49:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-07T15:49:46Z</dc:date>
    <item>
      <title>Set Analysis on previous month help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-previous-month-help/m-p/435693#M162506</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;im using the following expression to set the colour of a text box depending on a score :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(num(sum(score)/sum([Score Target]))=1,RGB(0,255,0),&lt;/P&gt;&lt;P&gt; if(num(sum(score)/sum([Score Target]))=0,RGB(255,128,0),RGB(255,0,0)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is working fine.&amp;nbsp; What I need to try and do is create three more text boxes to show the colour rating of previous months scores eg, For last month show a coloured textbox for April, A coloured text box for March and a coloured Text Box for February.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I basically need to know the three previous months trend (1 coloured text box for each previous month).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dates within my data model are&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="40715" class="jive-image" alt="dates.jpg" src="https://community.qlik.com/legacyfs/online/40715_dates.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if my initial If statement can be simplified in anyway using set analysis - that would be a great help too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fiorano&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 15:49:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-previous-month-help/m-p/435693#M162506</guid>
      <dc:creator />
      <dc:date>2013-05-07T15:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on previous month help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-previous-month-help/m-p/435694#M162507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Simplified no, more like the opposite. I've used max(cal_month) so you get the maximum of the possible month values, but perhaps you want something like num(month(today())) instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;=if(num(sum({&amp;lt;cal_month={'$(=max(cal_month))'}&amp;gt;}score)/sum(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;{&amp;lt;cal_month={'$(=max(cal_month))'}&amp;gt;}&lt;/SPAN&gt;[Score Target]))=1,RGB(0,255,0),&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;if(num(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;{&amp;lt;cal_month={'$(=max(cal_month))'}&amp;gt;}&lt;/SPAN&gt;sum(score)/sum(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;{&amp;lt;cal_month={'$(=max(cal_month))'}&amp;gt;}&lt;/SPAN&gt;[Score Target]))=0,RGB(255,128,0),RGB(255,0,0)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;=if(num(sum({&amp;lt;cal_month={'$(=max(cal_month)-1)'}&amp;gt;}score)/sum(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;{&amp;lt;cal_month={'$(=max(cal_month)-1)'}&amp;gt;}&lt;/SPAN&gt;[Score Target]))=1,RGB(0,255,0),&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;if(num(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;{&amp;lt;cal_month={'$(=max(cal_month)-1)'}&amp;gt;}&lt;/SPAN&gt;sum(score)/sum(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;{&amp;lt;cal_month={'$(=max(cal_month)-1)'}&amp;gt;}&lt;/SPAN&gt;[Score Target]))=0,RGB(255,128,0),RGB(255,0,0)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;=if(num(sum({&amp;lt;cal_month={'$(=max(cal_month)-2)'}&amp;gt;}score)/sum(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;{&amp;lt;cal_month={'$(=max(cal_month)-2)'}&amp;gt;}&lt;/SPAN&gt;[Score Target]))=1,RGB(0,255,0),&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;if(num(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;{&amp;lt;cal_month={'$(=max(cal_month)-2)'}&amp;gt;}&lt;/SPAN&gt;sum(score)/sum(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;{&amp;lt;cal_month={'$(=max(cal_month)-2)'}&amp;gt;}&lt;/SPAN&gt;[Score Target]))=0,RGB(255,128,0),RGB(255,0,0)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 16:11:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-previous-month-help/m-p/435694#M162507</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-07T16:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on previous month help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-previous-month-help/m-p/435695#M162508</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 solution.&amp;nbsp; I've tested the following expression to calculate the score rating for February :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(num(sum({&amp;lt;cal_month={'$(=num(month(today()))-3)'}&amp;gt;}score)/sum({&amp;lt;cal_month={'$(=num(month(today()))-3)'}&amp;gt;}[Score Target]))=1,RGB(0,255,0),&lt;/P&gt;&lt;P&gt;if(num({&amp;lt;cal_month={'$(=num(month(today()))-3)'}&amp;gt;}sum(score)/sum({&amp;lt;cal_month={'$(=num(month(today()))-3)'}&amp;gt;}[Score Target]))=0,RGB(255,128,0),RGB(255,0,0)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No 'colour rating' is happening to the text box.&amp;nbsp; Conversely, if I use my original expression and use listboxes to select 'Feb' then the textbox turns Red.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be very grateful for your thoughts on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fiorano&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************************************&lt;/P&gt;&lt;P&gt;EDIT - The problem is with my data! All working correctly now.!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Fiorano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 09:49:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-previous-month-help/m-p/435695#M162508</guid>
      <dc:creator />
      <dc:date>2013-05-08T09:49:56Z</dc:date>
    </item>
  </channel>
</rss>

