<?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 Fiscal YTD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-Fiscal-YTD/m-p/362713#M493974</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; I have monthly financial periods starting from 1 March 2011 to 28 Feb 2013 - 1 to 25 (Field is called 'FinncPriod'.&lt;/DIV&gt;&lt;DIV&gt; I need to do a set analyis to give me a ytd figure for the period 1 March 2011 to 29 Feb 2012 - periods 1 - 12.&lt;/DIV&gt;&lt;DIV&gt; I have an inline load -&lt;/DIV&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px; border-collapse: collapse;"&gt;&lt;TBODY&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD height="14" style="border: 0px black; width: 48pt; height: 10.5pt; background-color: transparent;" width="64"&gt;&lt;SPAN style="font-family: Verdana;"&gt;MinPeriod&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; width: 48pt; background-color: transparent;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;FinncPriod&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;6&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;7&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;8&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;9&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;11&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;12&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;14&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;15&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;16&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;17&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;18&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;19&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;20&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;21&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;22&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;23&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;24&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;25&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;DIV&gt;This links to my main table 'Journals' on the 'FinncPriod' field.&lt;/DIV&gt;&lt;DIV&gt;So for the 1st 12 periods (Mar 2011 - Feb 2012) the MinPeriod is always 1, the next 12 periods (Mar 2012 - Feb 2013) the MinPeriod is always 13. I am disregarding period 13 which was used for take-on balances. I created 2 variables -&lt;/DIV&gt;&lt;DIV&gt;vMinPeriod = MinPeriod and &lt;/DIV&gt;&lt;DIV&gt;vMaxFinncPriod = Max(FinncPriod). &lt;/DIV&gt;&lt;DIV&gt;So I think the set analysis expression (with the selections Year = 2012, Month = Feb)&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum({&amp;lt;MinPeriod={"=$(vMinPeriod)"},FinncPriod={"&amp;lt;=$(vMaxFinncPriod"} ,Drawer={'4'},Month=,Year=&amp;gt; } JrnAmt)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;should give me the ytd figure for Mar 2011-Feb 2012 but it doesn't work. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;If I change it to &lt;/SPAN&gt;&lt;/DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;MinPeriod&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;"=$(vMinPeriod)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;FinncPriod&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;"&amp;lt;=12"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;} ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Drawer&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={'4'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;=,Year=&amp;gt; } JrnAmt)&lt;SPAN style="color: #000000;"&gt; I get the correct answer. How can I change the set analysis expression so that I can use the variable vMaxFinncPriod. I'm including my model - Please have a look and advise.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 22 Apr 2012 15:24:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-04-22T15:24:41Z</dc:date>
    <item>
      <title>Set analysis Fiscal YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Fiscal-YTD/m-p/362713#M493974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; I have monthly financial periods starting from 1 March 2011 to 28 Feb 2013 - 1 to 25 (Field is called 'FinncPriod'.&lt;/DIV&gt;&lt;DIV&gt; I need to do a set analyis to give me a ytd figure for the period 1 March 2011 to 29 Feb 2012 - periods 1 - 12.&lt;/DIV&gt;&lt;DIV&gt; I have an inline load -&lt;/DIV&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px; border-collapse: collapse;"&gt;&lt;TBODY&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD height="14" style="border: 0px black; width: 48pt; height: 10.5pt; background-color: transparent;" width="64"&gt;&lt;SPAN style="font-family: Verdana;"&gt;MinPeriod&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; width: 48pt; background-color: transparent;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;FinncPriod&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;6&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;7&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;8&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;9&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;11&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;12&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;14&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;15&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;16&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;17&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;18&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;19&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;20&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;21&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;22&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;23&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;24&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 10.5pt;"&gt;&lt;TD align="right" height="14" style="border: 0px black; height: 10.5pt; background-color: transparent;"&gt;&lt;SPAN style="font-family: Verdana;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; background-color: transparent;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-family: Verdana;"&gt;25&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;DIV&gt;This links to my main table 'Journals' on the 'FinncPriod' field.&lt;/DIV&gt;&lt;DIV&gt;So for the 1st 12 periods (Mar 2011 - Feb 2012) the MinPeriod is always 1, the next 12 periods (Mar 2012 - Feb 2013) the MinPeriod is always 13. I am disregarding period 13 which was used for take-on balances. I created 2 variables -&lt;/DIV&gt;&lt;DIV&gt;vMinPeriod = MinPeriod and &lt;/DIV&gt;&lt;DIV&gt;vMaxFinncPriod = Max(FinncPriod). &lt;/DIV&gt;&lt;DIV&gt;So I think the set analysis expression (with the selections Year = 2012, Month = Feb)&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum({&amp;lt;MinPeriod={"=$(vMinPeriod)"},FinncPriod={"&amp;lt;=$(vMaxFinncPriod"} ,Drawer={'4'},Month=,Year=&amp;gt; } JrnAmt)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;should give me the ytd figure for Mar 2011-Feb 2012 but it doesn't work. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;If I change it to &lt;/SPAN&gt;&lt;/DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;MinPeriod&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;"=$(vMinPeriod)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;FinncPriod&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;"&amp;lt;=12"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;} ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Drawer&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={'4'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;=,Year=&amp;gt; } JrnAmt)&lt;SPAN style="color: #000000;"&gt; I get the correct answer. How can I change the set analysis expression so that I can use the variable vMaxFinncPriod. I'm including my model - Please have a look and advise.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Apr 2012 15:24:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Fiscal-YTD/m-p/362713#M493974</guid>
      <dc:creator />
      <dc:date>2012-04-22T15:24:41Z</dc:date>
    </item>
    <item>
      <title>Set analysis Fiscal YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Fiscal-YTD/m-p/362714#M493976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Danie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could not find the object with the expression above in your model, but looking at the variables, I suggest that you add an = sign to the definition of vMaxFinncPriod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Apr 2012 16:14:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Fiscal-YTD/m-p/362714#M493976</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-04-22T16:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis Fiscal YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Fiscal-YTD/m-p/362715#M493982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; Hi Jonathan - Thank you for the prompt reply. I changed it to -&lt;SPAN style="font-size: 8pt;"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;MinPeriod&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"=$(vMinPeriod)"&lt;/SPAN&gt;},&lt;SPAN style="color: #800000;"&gt;FinncPriod&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"&amp;lt;=$(=$(vMaxFinncPriod))"&lt;/SPAN&gt;} ,&lt;SPAN style="color: #800000;"&gt;Drawer{&lt;/SPAN&gt;'4'},&lt;SPAN style="color: #800000;"&gt;Month=&lt;/SPAN&gt;,Year=&amp;gt; } JrnAmt) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;and it worked.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thank you very much. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Danie&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Apr 2012 16:27:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Fiscal-YTD/m-p/362715#M493982</guid>
      <dc:creator />
      <dc:date>2012-04-22T16:27:49Z</dc:date>
    </item>
  </channel>
</rss>

