<?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 and expression scope in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-expression-scope/m-p/204043#M61120</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am attempting to show the sum of values purely for the last day of any given month. When I try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;sum({($&amp;lt;[Financial year] = {$(=Max([Financial year]))},Day={$(=day(MonthEnd(MakeDate(if(num(Month)&amp;lt; FYFirstMonth,max([Financial year]),max([Financial year]) - 1),num(Month)))))}&amp;gt;)} [Month end balance])&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I get nothing. If I try the Day expression as a value on the axis rather than part of a set expression, it shows the correct values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;day(MonthEnd(MakeDate(if(num(Month)&amp;lt; FYFirstMonth,max([Financial year]),max([Financial year]) - 1),num(Month))))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;. I have managed to frig the set by hardcoding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;sum({($&amp;lt;[Financial year] = {$(=Max([Financial year])-1)},Day={28, 29, 30, 31}&amp;gt;)} distinct [Month end balance])&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;but that is profoundly unsatisfactory, and then if there are values on more than one of the last four days of a 31 day month it will skew the result. Is there any way for the first expression to work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jan 2010 13:39:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-01-07T13:39:18Z</dc:date>
    <item>
      <title>Set analysis and expression scope</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-expression-scope/m-p/204043#M61120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am attempting to show the sum of values purely for the last day of any given month. When I try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;sum({($&amp;lt;[Financial year] = {$(=Max([Financial year]))},Day={$(=day(MonthEnd(MakeDate(if(num(Month)&amp;lt; FYFirstMonth,max([Financial year]),max([Financial year]) - 1),num(Month)))))}&amp;gt;)} [Month end balance])&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I get nothing. If I try the Day expression as a value on the axis rather than part of a set expression, it shows the correct values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;day(MonthEnd(MakeDate(if(num(Month)&amp;lt; FYFirstMonth,max([Financial year]),max([Financial year]) - 1),num(Month))))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;. I have managed to frig the set by hardcoding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;sum({($&amp;lt;[Financial year] = {$(=Max([Financial year])-1)},Day={28, 29, 30, 31}&amp;gt;)} distinct [Month end balance])&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;but that is profoundly unsatisfactory, and then if there are values on more than one of the last four days of a 31 day month it will skew the result. Is there any way for the first expression to work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 13:39:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-expression-scope/m-p/204043#M61120</guid>
      <dc:creator />
      <dc:date>2010-01-07T13:39:18Z</dc:date>
    </item>
  </channel>
</rss>

