<?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: Working with YearName in expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530988#M748342</link>
    <description>&lt;P&gt;If these two worked... I am almost certain that these should work as well...&lt;/P&gt;&lt;P&gt;Current Year&lt;/P&gt;&lt;PRE&gt;=Sum({&amp;lt;[FYear] = {"$(=YearName(Today(), 0, $(vFiscalYearStartMonth)))"}&amp;gt;} [Units])&lt;/PRE&gt;&lt;P&gt;Last Year&lt;/P&gt;&lt;PRE&gt;=Sum({&amp;lt;[FYear] = {"$(=YearName(AddYears(Today(), -1), 0, $(vFiscalYearStartMonth)))"}&amp;gt;} [Units])&lt;/PRE&gt;</description>
    <pubDate>Wed, 16 Jan 2019 12:56:54 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2019-01-16T12:56:54Z</dc:date>
    <item>
      <title>Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530889#M748330</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to populate a pivot table with sales data for this and last financial years. Currently i can do that for this year using the following expression: =sum({&amp;lt;[FYear] = {"=YearName(Today())"}&amp;gt;}[Units]).&lt;/P&gt;&lt;P&gt;however if i try and do the same for last year using the expression: =sum({&amp;lt;[FYear] = {"=YearName(addyears(Today(),-1))"}&amp;gt;}[Units]), i get the same data for both columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain where/why i'm going wrong please.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530889#M748330</guid>
      <dc:creator>StuartJohnson</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530908#M748331</link>
      <description>can you try this&lt;BR /&gt;&lt;BR /&gt;=sum({&amp;lt;[FYear] = {"$(=YearName(addyears(Today(),-1)))"}&amp;gt;}[Units])</description>
      <pubDate>Wed, 16 Jan 2019 11:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530908#M748331</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2019-01-16T11:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530930#M748332</link>
      <description>&lt;P&gt;Thanks i tried that, but it doesn't show any sales when i use that expression&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:04:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530930#M748332</guid>
      <dc:creator>StuartJohnson</dc:creator>
      <dc:date>2019-01-16T12:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530950#M748333</link>
      <description>&lt;P&gt;How do you create FYear in the script? Is it created using Year function? If it is, then try this&lt;/P&gt;&lt;PRE&gt;=Sum({&amp;lt;[FYear] = {"$(=&lt;FONT color="#FF0000"&gt;Year&lt;/FONT&gt;(AddYears(Today(), -1)))"}&amp;gt;} [Units])&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:31:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530950#M748333</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-16T12:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530961#M748334</link>
      <description>&lt;P&gt;I created FYear using the below;&lt;/P&gt;&lt;P&gt;Yearname(TempDate2, 0, $(vFiscalYearStartMonth)) as FYear it creates a valur in the format 2018-2019. If i use the string it returns 0 for sales, if i use your formula it still returns 0 sales. But i can get it to work for this year?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:44:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530961#M748334</guid>
      <dc:creator>StuartJohnson</dc:creator>
      <dc:date>2019-01-16T12:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530964#M748335</link>
      <description>&lt;P&gt;How about this then&lt;/P&gt;&lt;PRE&gt;=Sum({&amp;lt;[FYear] = {"&lt;FONT color="#FF0000"&gt;$(&lt;/FONT&gt;=YearName(Today()&lt;FONT color="#FF0000"&gt;, 0, $(vFiscalYearStartMonth)&lt;/FONT&gt;)&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;"}&amp;gt;} [Units])&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:47:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530964#M748335</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-16T12:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530968#M748336</link>
      <description>&lt;P&gt;My variables are stored in my load tabs, can they still be used on sheets. However this still returns 0?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:49:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530968#M748336</guid>
      <dc:creator>StuartJohnson</dc:creator>
      <dc:date>2019-01-16T12:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530972#M748337</link>
      <description>&lt;P&gt;Can you check what do you get when you use this in a text box object&lt;/P&gt;&lt;PRE&gt;=YearName(Today()&lt;FONT color="#FF0000"&gt;, 0, $(vFiscalYearStartMonth)&lt;/FONT&gt;)&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:51:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530972#M748337</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-16T12:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530975#M748338</link>
      <description>&lt;P&gt;Also, check when you use this&lt;/P&gt;&lt;PRE&gt;=YearName(AddYears(Today(), -1)&lt;FONT color="#FF0000"&gt;, 0, $(vFiscalYearStartMonth)&lt;/FONT&gt;)&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:52:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530975#M748338</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-16T12:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530978#M748339</link>
      <description>&lt;P&gt;I get 2018-2019&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:52:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530978#M748339</guid>
      <dc:creator>StuartJohnson</dc:creator>
      <dc:date>2019-01-16T12:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530982#M748340</link>
      <description>&lt;P&gt;For the second expression i get the correct 2017-2018. i guess i must be doing something wrong elsewhere.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:54:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530982#M748340</guid>
      <dc:creator>StuartJohnson</dc:creator>
      <dc:date>2019-01-16T12:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530985#M748341</link>
      <description>&lt;P&gt;Now can you check when you use this&lt;/P&gt;&lt;PRE&gt;=Sum({&amp;lt;[FYear] = {"2018-2019"}&amp;gt;} [Units])&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE&gt;=Sum({&amp;lt;[FYear] = {"2017-2018"}&amp;gt;} [Units])&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:55:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530985#M748341</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-16T12:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530988#M748342</link>
      <description>&lt;P&gt;If these two worked... I am almost certain that these should work as well...&lt;/P&gt;&lt;P&gt;Current Year&lt;/P&gt;&lt;PRE&gt;=Sum({&amp;lt;[FYear] = {"$(=YearName(Today(), 0, $(vFiscalYearStartMonth)))"}&amp;gt;} [Units])&lt;/PRE&gt;&lt;P&gt;Last Year&lt;/P&gt;&lt;PRE&gt;=Sum({&amp;lt;[FYear] = {"$(=YearName(AddYears(Today(), -1), 0, $(vFiscalYearStartMonth)))"}&amp;gt;} [Units])&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:56:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530988#M748342</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-16T12:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530989#M748343</link>
      <description>&lt;P&gt;the first one 2018-2109 returns 0, the second 2017-2018 returns a value&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:58:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530989#M748343</guid>
      <dc:creator>StuartJohnson</dc:creator>
      <dc:date>2019-01-16T12:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530990#M748344</link>
      <description>&lt;P&gt;Do you have data for 2018-2019? Also, make sure that there is not another selection which contradicts your set analysis?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 13:00:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530990#M748344</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-16T13:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530991#M748345</link>
      <description>&lt;P&gt;Correction, they both return values.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 13:00:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530991#M748345</guid>
      <dc:creator>StuartJohnson</dc:creator>
      <dc:date>2019-01-16T13:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530992#M748346</link>
      <description>&lt;P&gt;Using your latest expressions i get sales for this year and -1 for all rows in Last year&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 13:01:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530992#M748346</guid>
      <dc:creator>StuartJohnson</dc:creator>
      <dc:date>2019-01-16T13:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530993#M748347</link>
      <description>&lt;P&gt;Awesome, then try these&lt;/P&gt;&lt;PRE&gt;=Sum({&amp;lt;[FYear] = {"$(=YearName(Today(), 0, $(vFiscalYearStartMonth)))"}&amp;gt;} [Units])&lt;/PRE&gt;&lt;PRE&gt;=Sum({&amp;lt;[FYear] = {"$(=YearName(AddYears(Today(), -1), 0, $(vFiscalYearStartMonth)))"}&amp;gt;} [Units])&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 13:02:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530993#M748347</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-16T13:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530996#M748348</link>
      <description>&lt;P&gt;Thank you, so much. now they're both returning values. I dont suppose you could explain why what i was trying initially wouldn't work?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 13:04:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530996#M748348</guid>
      <dc:creator>StuartJohnson</dc:creator>
      <dc:date>2019-01-16T13:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Working with YearName in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530998#M748349</link>
      <description>&lt;P&gt;First, you were not using the dollar sign expansion in your variable... which does a row by row comparison... to compare FYear to a single value... you need a dollar sign expansion&lt;/P&gt;&lt;PRE&gt;=Sum({&amp;lt;[FYear] = {"&lt;FONT color="#FF0000"&gt;$(=&lt;/FONT&gt;YearName(AddYears(Today(), -1), 0, $(vFiscalYearStartMonth))&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;"}&amp;gt;} [Units])&lt;/PRE&gt;&lt;P&gt;Second, I think you probably will get different values if you use this is a text box&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;=YearName(AddYears(Today(), -1), 0, $(vFiscalYearStartMonth))&lt;/PRE&gt;&lt;P&gt;vs this&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;=YearName(AddYears(Today(), -1))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Which is why I believe&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/16186"&gt;@pradosh_thakur&lt;/a&gt;'s expression didn't work for you... otherwise his expression would have worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 13:07:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-YearName-in-expressions/m-p/1530998#M748349</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-16T13:07:27Z</dc:date>
    </item>
  </channel>
</rss>

