<?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: How to insert eXP field into my YTD script ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931218#M648746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you have a YTD field in your data model? If so, your expression might be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;YTD={'1'}, eXP={'eXP'}&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, then maybe you have a year or date field you can use, in which case your expression might be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={'$(=max(Year))'}, eXP={'eXP'}&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Date={"&amp;gt;=$(=YearStart(Max(Date)))"}, eXP={'eXP'}&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Oct 2015 15:47:13 GMT</pubDate>
    <dc:creator>marcus_malinow</dc:creator>
    <dc:date>2015-10-20T15:47:13Z</dc:date>
    <item>
      <title>How to insert eXP field into my YTD script ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931217#M648745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my load script , i have below script :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If([Reporting Code]&amp;gt;=100 and [Reporting Code]&amp;lt;=374,'eXP') as [eXP],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i make use of below expression it work fine for pivot table to display Exp by month :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;eXP={"eXP"}&amp;gt;}Amount)/1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i am stuck when i try use of above expression , by Add YTD field , Hope some one can advise me. ( what i need is get the YTD expense amount. )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My imagine expression should be some thing like this , but it does not work :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(if(YTD and eXP='eXP',Amount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it return wrong value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 15:37:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931217#M648745</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2015-10-20T15:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert eXP field into my YTD script ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931218#M648746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you have a YTD field in your data model? If so, your expression might be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;YTD={'1'}, eXP={'eXP'}&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, then maybe you have a year or date field you can use, in which case your expression might be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={'$(=max(Year))'}, eXP={'eXP'}&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Date={"&amp;gt;=$(=YearStart(Max(Date)))"}, eXP={'eXP'}&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 15:47:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931218#M648746</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2015-10-20T15:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert eXP field into my YTD script ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931219#M648747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i try :-&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;sum({$&amp;lt;YTD={'1'}, eXP={'eXP'}&amp;gt;} Amount)&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: 13px; line-height: 1.5em;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;Year={'$(=max(Year))'}, eXP={'eXP'}&amp;gt;} Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it return wrong result , ( ya i do have YTD field and LY_YTD field ) , my head get very heavy , and i feel like give up , and want to take a break , suddenly i saw you also give me the last proposal , and i suddenly wake up because the value look good. i think it display for me YTD value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;sum({$&amp;lt;Date={"&amp;gt;=$(=YearStart(Max(Date)))"}, eXP={'eXP'}&amp;gt;} Amount)&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: 13px; 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: 13px; line-height: 1.5em;"&gt;Now my question is how to modify the above expression , so that it will return me YTD last year value ?&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: 13px; 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: 13px; line-height: 1.5em;"&gt;Paul &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 16:02:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931219#M648747</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2015-10-20T16:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert eXP field into my YTD script ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931220#M648749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assuming here that we're ok to use Today() as the basis of our calculation....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Date={"&amp;gt;=$(=AddYears(YearStart(Max(Date)),-1))&amp;lt;=$(=AddYears(Today(),-1))"}, eXP={'eXP')&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if Date just runs to today...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Date={"&amp;gt;=$(=AddYears(YearStart(Max(Date)), -1))&amp;lt;=$(=AddYears(Max(Date), -1))"}, eXP={'eXP'}&amp;gt;} Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 16:07:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931220#M648749</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2015-10-20T16:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert eXP field into my YTD script ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931221#M648750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes i am okay to use today date for cal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;sum({$&amp;lt;Date={"&amp;gt;=$(=AddYears(YearStart(Max(Date)), -1))&amp;lt;=$(=AddYears(Max(Date), -1))"}, eXP={'eXP'}&amp;gt;} Amount)&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: 13px; 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: 13px; line-height: 1.5em;"&gt;when i try the above expression , it return wrong value. &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: 13px; 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: 13px; line-height: 1.5em;"&gt;Paul&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 16:15:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931221#M648750</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2015-10-20T16:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert eXP field into my YTD script ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931222#M648752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok then try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Date={"&amp;gt;=$(=AddYears(YearStart(Today()),-1))&amp;lt;=$(=AddYears(Today(),-1))"}, eXP={'eXP')&amp;gt;} Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 16:19:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931222#M648752</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2015-10-20T16:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert eXP field into my YTD script ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931223#M648753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have try , it display null value or missing value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that when i use your expression , i don't need to select month = 10 and year = 2015 right ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As i am using the expression in QS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 16:23:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931223#M648753</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2015-10-20T16:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert eXP field into my YTD script ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931224#M648755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, you don't need to select anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Might be useful if you uploaded a sample application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 16:36:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931224#M648755</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2015-10-20T16:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert eXP field into my YTD script ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931225#M648756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After i rest for a while , and i make use of my existing SET expression and add the eXP='eXP' and now it work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;year = {$(=max(year)-1)}, month = {"&amp;lt;=$(=max({&amp;lt;year={$(=max(year))}&amp;gt;} month))"},eXP='eXP')&amp;gt;}Amount/1/1000)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i can have a good night sleep now. Thank a lot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 16:39:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-insert-eXP-field-into-my-YTD-script/m-p/931225#M648756</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2015-10-20T16:39:40Z</dc:date>
    </item>
  </channel>
</rss>

