<?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: Alternate States for generating Last Year figures in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085081#M361403</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using this in the Last Year expression gives the correct answer:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #20124d; font-family: arial, sans-serif; font-size: 12.8px;"&gt;(sum({$&amp;lt;TransactionDate = alt::TransactionDate, LYDTE, TransactionYear&amp;gt;}LegFare) + sum({$&amp;lt;TransactionDate = alt::TransactionDate, LYDTE, TransactionYear&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #20124d; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #20124d; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #20124d; font-family: arial, sans-serif; font-size: 12.8px;"&gt;ProductsValue))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Props to &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt;‌ for the answer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Apr 2016 12:52:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-04-26T12:52:24Z</dc:date>
    <item>
      <title>Alternate States for generating Last Year figures</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085075#M361397</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;I have created a trigger that when a date is slected it takes the date from last year as a selection in the alternate state.&lt;/P&gt;&lt;P&gt;It's a document trigger that has ONANYSELECT trigger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This all works fine when no selection are made:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="TY v LY 1.PNG" class="jive-image image-1" src="/legacyfs/online/122417_TY v LY 1.PNG" style="height: 294px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I select a field to limit the data by the LY figure instead sums everything for this year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Ty v LY 2.PNG" class="jive-image image-2" src="/legacyfs/online/122418_Ty v LY 2.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I have tried using Copy State contents but this just results in the alternate state and default state same being the exact same figures.&lt;/P&gt;&lt;P&gt;I have tried this Copy State trigger at the start before all the other triggers and at the end and it still doesn't work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone else had this issue?&lt;/P&gt;&lt;P&gt;Is there a way around this or is this just a bug of Qlikview and Copy State not working correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help, Lauren &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/plain.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 12:55:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085075#M361397</guid>
      <dc:creator />
      <dc:date>2016-04-22T12:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate States for generating Last Year figures</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085076#M361398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand what you're trying to do. Why do you think you need to use alternate states and the black magick of triggers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 15:57:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085076#M361398</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-04-22T15:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate States for generating Last Year figures</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085077#M361399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I select a date periods say 01/01/2016-&lt;SPAN style="font-size: 13.3333px;"&gt;05/01/2016&lt;/SPAN&gt; the alternate state then selects the year before dates says 01/01/2015-05/01/2015. I do this because i want to show the user This years revenue vs. Last years revenue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you need me to elaborate, sorry if im being vague.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And thanks for getting back to me!&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Apr 2016 22:03:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085077#M361399</guid>
      <dc:creator />
      <dc:date>2016-04-24T22:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate States for generating Last Year figures</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085078#M361400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The CY vs LY can be achieved using the set anlaysis not sure why you need to go to alternate states to achieve that&lt;/P&gt;&lt;P&gt;Have a look at the below thread for CY vs LY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3619"&gt;Year-over-Year Comparisons&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 04:16:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085078#M361400</guid>
      <dc:creator>qliksus</dc:creator>
      <dc:date>2016-04-25T04:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate States for generating Last Year figures</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085079#M361401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Previous year Expression-&lt;/STRONG&gt; sum( {$&amp;lt;Call_Year={"$(=DATE(FLOOR(YearStart(YearStart(Today())-1)),'YYYY'))"}&amp;gt;} CountID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Current year Expression- &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sum( {$&amp;lt;Call_Year={"$(=DATE(FLOOR(YearStart(Today())),'YYYY'))"}&amp;gt;} CountID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;don't ignore rest date fields (i.e date=).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also would request you to share sample data to exhibit the same logic using that data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 04:35:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085079#M361401</guid>
      <dc:creator>Pulkit_Thukral</dc:creator>
      <dc:date>2016-04-25T04:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate States for generating Last Year figures</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085080#M361402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again for getting back to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was advised that using set analysis is resource heavy.&lt;/P&gt;&lt;P&gt;Is this not the case?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also at the moment I have TY vs LY using a column in my SQL database called LY_DTE which maps last years date.&lt;/P&gt;&lt;P&gt;However there are two other columns I will need for the user called LY_COM which a business set date and LY_DAY which maps last years date but on day of week instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 10:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085080#M361402</guid>
      <dc:creator />
      <dc:date>2016-04-25T10:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate States for generating Last Year figures</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085081#M361403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using this in the Last Year expression gives the correct answer:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #20124d; font-family: arial, sans-serif; font-size: 12.8px;"&gt;(sum({$&amp;lt;TransactionDate = alt::TransactionDate, LYDTE, TransactionYear&amp;gt;}LegFare) + sum({$&amp;lt;TransactionDate = alt::TransactionDate, LYDTE, TransactionYear&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #20124d; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #20124d; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #20124d; font-family: arial, sans-serif; font-size: 12.8px;"&gt;ProductsValue))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Props to &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt;‌ for the answer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 12:52:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-States-for-generating-Last-Year-figures/m-p/1085081#M361403</guid>
      <dc:creator />
      <dc:date>2016-04-26T12:52:24Z</dc:date>
    </item>
  </channel>
</rss>

