<?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 Expression - YTD Sales in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Expression-YTD-Sales/m-p/658519#M1056240</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am trying to calculate YTD Sales using a set expression, based on the financial month selected.&lt;/P&gt;&lt;P&gt;Our financial year is Jul - Jun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Example:&lt;/P&gt;&lt;P&gt;If I select the months Jul, Aug &amp;amp; Sep to get the first quarters YTD sales I should get $3,000,000. If I was to select Oct, Nov &amp;amp; Dec to get the second quarters YTD sales I should get $6,000,000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Financial Month&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Sales&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Jul&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Aug&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Sep&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Oct&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Nov&lt;/TD&gt;&lt;TD&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Dec&lt;/TD&gt;&lt;TD&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried creating a variable called vFinancialMonth and updating it with =GetFieldSelections(FinancialMonth) and then my set expression is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;FinancialMonth = {'&amp;gt;=$(=vFinancialMonth)'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;but this doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone else have any other ideas?&lt;/P&gt;&lt;P&gt;P.S I don't want to have an extra field called Financial Quarter attached to my calendar, I would rather the user just selects the financial months they would like to deal with, this way they could use it for any sort of period they need, eg Quarterly reports, 6 Monthly reports etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Jordan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Oct 2014 00:57:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-20T00:57:00Z</dc:date>
    <item>
      <title>Set Expression - YTD Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-YTD-Sales/m-p/658519#M1056240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am trying to calculate YTD Sales using a set expression, based on the financial month selected.&lt;/P&gt;&lt;P&gt;Our financial year is Jul - Jun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Example:&lt;/P&gt;&lt;P&gt;If I select the months Jul, Aug &amp;amp; Sep to get the first quarters YTD sales I should get $3,000,000. If I was to select Oct, Nov &amp;amp; Dec to get the second quarters YTD sales I should get $6,000,000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Financial Month&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Sales&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Jul&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Aug&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Sep&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Oct&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Nov&lt;/TD&gt;&lt;TD&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Dec&lt;/TD&gt;&lt;TD&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;$1,000,000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried creating a variable called vFinancialMonth and updating it with =GetFieldSelections(FinancialMonth) and then my set expression is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;FinancialMonth = {'&amp;gt;=$(=vFinancialMonth)'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;but this doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone else have any other ideas?&lt;/P&gt;&lt;P&gt;P.S I don't want to have an extra field called Financial Quarter attached to my calendar, I would rather the user just selects the financial months they would like to deal with, this way they could use it for any sort of period they need, eg Quarterly reports, 6 Monthly reports etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Jordan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 00:57:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-YTD-Sales/m-p/658519#M1056240</guid>
      <dc:creator />
      <dc:date>2014-10-20T00:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression - YTD Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-YTD-Sales/m-p/658520#M1056241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If you have a date dimension then try like this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; sum({&amp;lt;FinancialYear=, &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;FinancialMonth =, DateDimensionName={'&amp;gt;=$(=YearStart(Today(), 0, 7))&amp;lt;=$(=Date(Max(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DateDimensionName&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;)))'}&amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;Note: Replace &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FinancialYear, &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FinancialMonth and DateDimensionName fields with your actual dimensions.If this expression not working then attach some sample file.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 02:12:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-YTD-Sales/m-p/658520#M1056241</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-10-20T02:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set Expression - YTD Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-YTD-Sales/m-p/658521#M1056242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unable to attach our actual project and data due to confidentiality, however I have made up a test document to show you what I am trying to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you open the document you will see a Straight Table with a column called "YTD This Year (2015)" if you select the financial year as 2015 and the Financial Month as Sep - Oct, you should have a customer show up called ABC Limited, I want the YTD This Year 2015 column to sum the sales from July (Beginning of the Financial Year) - October (Last month selected), which should be $3,907,000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps explain what we are trying to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jordan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 22:53:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-YTD-Sales/m-p/658521#M1056242</guid>
      <dc:creator />
      <dc:date>2014-10-20T22:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression - YTD Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-YTD-Sales/m-p/658522#M1056243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have worked it out....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached an updated qvw file for anyone to look at and see how I got it going.&lt;/P&gt;&lt;P&gt;I added a month number to my calendar called FinMonthNbr and then used the following expression:&lt;/P&gt;&lt;P&gt;sum({1&amp;lt;FinMonthNbr ={'&amp;lt;=$(=max(FinMonthNbr))'}, FinancialYear = {'$(=getfieldselections(FinancialYear))'}&amp;gt;}Sale)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 01:53:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-YTD-Sales/m-p/658522#M1056243</guid>
      <dc:creator />
      <dc:date>2014-10-21T01:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression - YTD Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-YTD-Sales/m-p/658523#M1056244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jordan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding Quarter to your datamodel will be more helpful, because you don't need to select 3 months to see full Quarter values, just select Quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FinancialMonths:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month, FinancialMonth, FinMonthNbr, Quarter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jul, Jul, 1,Q1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aug, Aug, 2,Q1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sep, Sep, 3,Q1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Oct, Oct, 4,Q2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Nov, Nov, 5,Q2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec, Dec, 6,Q2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jan, Jan, 7,Q3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Feb, Feb, 8,Q3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mar, Mar, 9,Q3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Apr, Apr, 10,Q4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; May, May, 11,Q4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jun, Jun, 12,Q4&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 03:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-YTD-Sales/m-p/658523#M1056244</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-10-21T03:09:30Z</dc:date>
    </item>
  </channel>
</rss>

