<?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 syntax in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413521#M487146</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you have a cycle widget, you can load the last day of the week, month, year, and day (it will make the expression easier) into separate fields in the master calendar. You will need name the fields with the field names used in the cycle widget, e.g., LastDayOfDay, LastDayOfWeek, LastDayOfMonth, LastDayOfYear if your dimensions are Day, Week, Month, Year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your expression you will need to use the GetCurrentField to get the select dimension and use something like sum({&amp;lt;LastDayOf$(=GetCurrentField(DateSelection))=1&amp;gt;} value).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Mar 2013 17:41:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-03-07T17:41:16Z</dc:date>
    <item>
      <title>Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413516#M487141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as far as i remember i used to script set analysis like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DateJ={$(=max(DateJ)) }&amp;gt;}&amp;nbsp; Nb)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i write &lt;/P&gt;&lt;P&gt;sum({&amp;lt;DateJ={'31/01/2013'}&amp;gt;}&amp;nbsp; Nb)&amp;nbsp; it works, nevertheless i want to do so for everymonth in a pivot table so max(DateJ) should be given by month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 13:54:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413516#M487141</guid>
      <dc:creator />
      <dc:date>2013-03-06T13:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413517#M487142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The syntax is correct, but you have to understand that a set analysis expression creates only one set for the entire chart. The dimensions are then applied to the set. The set is not calculated per row. So if you use month as a dimension you'll see one month with a value. The month with the overall max date. You could try using a calculated dimension =dual(Month,aggr(max(DateJ),Month)). Change Month to the name of your month field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 14:18:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413517#M487142</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-06T14:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413518#M487143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Gisbert&amp;nbsp; you're right i forgot that point but anyway even for 1 month it doesn't work.&lt;/P&gt;&lt;P&gt;I tried IF as well but doesn't give much.&lt;/P&gt;&lt;P&gt;What i want is the value of the last day for every month. Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 14:39:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413518#M487143</guid>
      <dc:creator />
      <dc:date>2013-03-06T14:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413519#M487144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have a master calendare, you can load a new field, say EndOfMonth, that will contain 1 of the day is the end of the month, 0 if not. Then you can sum({&amp;lt;EndOfMonth=1 }&amp;gt;} Nb) as you expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 18:42:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413519#M487144</guid>
      <dc:creator />
      <dc:date>2013-03-06T18:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413520#M487145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, it could be the way to do so but actually it's a bit more complicated because i'm using a cyclic group with day, week, month, year dimension.&lt;/P&gt;&lt;P&gt;When it is day i want sum(Nb) but for others I just want the sum({&amp;lt;Date={max(date)}&amp;gt;} Nb)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 08:38:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413520#M487145</guid>
      <dc:creator />
      <dc:date>2013-03-07T08:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413521#M487146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you have a cycle widget, you can load the last day of the week, month, year, and day (it will make the expression easier) into separate fields in the master calendar. You will need name the fields with the field names used in the cycle widget, e.g., LastDayOfDay, LastDayOfWeek, LastDayOfMonth, LastDayOfYear if your dimensions are Day, Week, Month, Year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your expression you will need to use the GetCurrentField to get the select dimension and use something like sum({&amp;lt;LastDayOf$(=GetCurrentField(DateSelection))=1&amp;gt;} value).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 17:41:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413521#M487146</guid>
      <dc:creator />
      <dc:date>2013-03-07T17:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413522#M487147</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 was a good idea but i can't use it because the value i need is not endofyear/month/week but max(year/month/week) according to the current selection.&lt;/P&gt;&lt;P&gt;I don't need a full week/month/year to be finished to display the result. It can be in the middle of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just don't understant why sum({&amp;lt;max(DateFromTable2) = { $(=max(DateSelectedTable1)) } &amp;gt;} Nb ) doesn't work.&lt;/P&gt;&lt;P&gt;Neither sum(if (max(D1) = max(D2), Nb) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 10:05:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413522#M487147</guid>
      <dc:creator />
      <dc:date>2013-03-14T10:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413523#M487148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that set analysis are resolved for the entire set instead of each dimension. One way around this to construct a list of all end dates by dimensions and use the set analysis on that set. So it may look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;DateJ={$(=Concat(Aggr(MaxString(DateJ), date_dimension),','))}&amp;gt;} Nb)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 17:06:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413523#M487148</guid>
      <dc:creator />
      <dc:date>2013-03-14T17:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413524#M487149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you but it doesn't give result but 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got back to previous proposal with LastDay, which is a useful one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your cooperation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 09:22:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/413524#M487149</guid>
      <dc:creator />
      <dc:date>2013-03-15T09:22:14Z</dc:date>
    </item>
  </channel>
</rss>

