<?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 prb in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-prb/m-p/314835#M499064</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm, I don't completely understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above expression is to give you the sum of CA_RAY for week prior to selected, is this true?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you calculate the expression for N vs N-1 then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that you may only select one value in the Annee resp. Semaine fields, because only will give you NULL if you select more than one value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you post a small example app here? I think this would make things easier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 31 Jul 2011 00:42:59 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-07-31T00:42:59Z</dc:date>
    <item>
      <title>Set analysis prb</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-prb/m-p/314834#M499063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I want to compare sales : week&amp;nbsp; Vs Week -1 and Week N Vs Week N -1 &lt;/P&gt;&lt;P&gt;i use : &lt;/P&gt;&lt;P&gt;"=sum({$&amp;lt;Année = {$( =only(Année) - $(=if(only(Semaine) = 1, 1, 0)))}, Semaine = {$( =only(Semaine)-1 + $(=if(only(Semaine) = 1, 53, 0)))}&amp;gt;} CA_RAY)"&lt;/P&gt;&lt;P&gt;For Week Vs Week -1 nut result for all week it's 0 only for week 1 this work&lt;/P&gt;&lt;P&gt;but for Week N Vs N-1 it's work perfectly.&lt;/P&gt;&lt;P&gt;I need your help pls!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 16:28:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-prb/m-p/314834#M499063</guid>
      <dc:creator />
      <dc:date>2011-07-28T16:28:43Z</dc:date>
    </item>
    <item>
      <title>Set analysis prb</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-prb/m-p/314835#M499064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm, I don't completely understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above expression is to give you the sum of CA_RAY for week prior to selected, is this true?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you calculate the expression for N vs N-1 then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that you may only select one value in the Annee resp. Semaine fields, because only will give you NULL if you select more than one value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you post a small example app here? I think this would make things easier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Jul 2011 00:42:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-prb/m-p/314835#M499064</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-31T00:42:59Z</dc:date>
    </item>
    <item>
      <title>Set analysis prb</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-prb/m-p/314836#M499065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello My probléme is resolved I used a fieled with If expression to select Année (Year) and Semaine ( Week)&lt;/P&gt;&lt;P&gt;So the function Only dont work .&lt;/P&gt;&lt;P&gt;Thanks for your help !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Expression for N Vs N-1 : sum({$&amp;lt;YearNumber = {$(=only(YearNumber) - 1)}&amp;gt;} SALES)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Expression for Week Vs Week -1 : &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;sum({$&amp;lt;YearNumber = {$( =only(YearNumber) - $(=if(only(WeekNumber) = 1, 1, 0)))}, WeekNumber = {$( =only(WeekNumber)-1 + $(=if(only(WeekNumber) = 1, 53, 0)))}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 08:28:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-prb/m-p/314836#M499065</guid>
      <dc:creator />
      <dc:date>2011-08-01T08:28:12Z</dc:date>
    </item>
    <item>
      <title>Set analysis prb</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-prb/m-p/314837#M499066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am glad that this was of any help for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of Only() you could use max() function, which will also work if you select more than one (returning the max year for example), or limit the field selection in properties to always one selected value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your Week vs Week-1 calculation, it might be easier if you calculate the week difference based on date (using eg weekstart() ), this should take year change into account. There is also a weekyear() function to calculate the year a week is in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 08:41:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-prb/m-p/314837#M499066</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-01T08:41:34Z</dc:date>
    </item>
  </channel>
</rss>

