<?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: Opening Event in Doc not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Opening-Event-in-Doc-not-working/m-p/1795550#M1211168</link>
    <description>&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;if I wanted to use your solution (FirstSortedValue({&amp;lt;HasValue={'1'}&amp;gt;}FY, -PeriodID))&amp;nbsp; in a expression on a chart, how would I do it?&lt;/P&gt;&lt;P&gt;Expression would look sometime like this...&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Channel = {'Banking App'},CostName={'Prev_Yr_Actuals'},Period=, FY={"=$(YourSolution)"}&amp;gt;}Value)...&lt;/P&gt;&lt;P&gt;(The FY field is a dual field.)&lt;/P&gt;&lt;P&gt;in Short - I want the same behavior that we mimicked on Open Event, to happen if a user didnt make a selection on FY.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;(I have created a separate thread for this question -&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/Syntax-using-FirstSortedValue-in-set-Analysis/m-p/1795617#M1211177" target="_blank"&gt;https://community.qlik.com/t5/QlikView-App-Dev/Syntax-using-FirstSortedValue-in-set-Analysis/m-p/1795617#M1211177&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 30 Mar 2021 10:33:21 GMT</pubDate>
    <dc:creator>QFanatic</dc:creator>
    <dc:date>2021-03-30T10:33:21Z</dc:date>
    <item>
      <title>Opening Event in Doc not working</title>
      <link>https://community.qlik.com/t5/QlikView/Opening-Event-in-Doc-not-working/m-p/1795416#M1211150</link>
      <description>&lt;P&gt;hi Guys&lt;/P&gt;&lt;P&gt;PFA Scrambled model.&lt;/P&gt;&lt;P&gt;I want the model to execute the Select indicated, upon opening.&lt;/P&gt;&lt;P&gt;how the data works - Predicted values populate future values as well, so eg for budget I will have values for all Periods. For actuals obviously, that wont be the case (the flag field is called HasValue).&lt;/P&gt;&lt;P&gt;So when the doc opens, I want to go to the MAX Financial year, where values have been populated (HasValue = 1).&lt;/P&gt;&lt;P&gt;Its not working&lt;/P&gt;&lt;P&gt;Appreciate all assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 18:25:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Opening-Event-in-Doc-not-working/m-p/1795416#M1211150</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2021-03-29T18:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Opening Event in Doc not working</title>
      <link>https://community.qlik.com/t5/QlikView/Opening-Event-in-Doc-not-working/m-p/1795504#M1211161</link>
      <description>&lt;P&gt;Looking in your qvw the contents of your select variable is:&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;=(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;max&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;({&amp;lt;&lt;/SPAN&gt;PeriodID&lt;SPAN class="s1"&gt;={&lt;/SPAN&gt;"$(=max(PeriodID))"&lt;SPAN class="s1"&gt;},&lt;/SPAN&gt;HasValue&lt;SPAN class="s1"&gt;={'1'}&amp;gt;}&lt;/SPAN&gt;FY&lt;SPAN class="s1"&gt;))&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;This is not working because the Max(PeriodID) does not HasValue=1. So you get nothing.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;You want the max(PeriodId) &lt;EM&gt;within the set&lt;/EM&gt; of PeriodIds with HasValue=1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;=(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;only&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;({&amp;lt;&lt;/SPAN&gt;PeriodID&lt;SPAN class="s1"&gt;={&lt;/SPAN&gt;"$(=max({&amp;lt;HasValue={'1'}&amp;gt;}PeriodID))"&lt;SPAN class="s1"&gt;}&amp;gt;}&lt;/SPAN&gt;FY&lt;SPAN class="s1"&gt;))&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Note I also changed the first max() to only(). Your FY values are like "2020/2021" which are not numbers.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Another required change is your OnOpen Select in Field value should not include $() around the variable. Should be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;vOpenString&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p1"&gt;With the $() the FY value will get evaluated as arithmetic giving you&amp;nbsp; 2020 divided by 2021.&lt;/P&gt;&lt;P class="p1"&gt;You could also code the expression as:&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;=(&lt;SPAN class="s1"&gt;FirstSortedValue&lt;/SPAN&gt;({&amp;lt;&lt;SPAN class="s2"&gt;HasValue&lt;/SPAN&gt;={'1'}&amp;gt;}&lt;SPAN class="s2"&gt;FY&lt;/SPAN&gt;, -&lt;SPAN class="s2"&gt;PeriodID&lt;/SPAN&gt;))&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;which strikes me as easier to read.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 05:07:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Opening-Event-in-Doc-not-working/m-p/1795504#M1211161</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2021-03-30T05:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Opening Event in Doc not working</title>
      <link>https://community.qlik.com/t5/QlikView/Opening-Event-in-Doc-not-working/m-p/1795507#M1211163</link>
      <description>&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;Thank you very much for your assistance. Much appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 05:58:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Opening-Event-in-Doc-not-working/m-p/1795507#M1211163</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2021-03-30T05:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Opening Event in Doc not working</title>
      <link>https://community.qlik.com/t5/QlikView/Opening-Event-in-Doc-not-working/m-p/1795550#M1211168</link>
      <description>&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;if I wanted to use your solution (FirstSortedValue({&amp;lt;HasValue={'1'}&amp;gt;}FY, -PeriodID))&amp;nbsp; in a expression on a chart, how would I do it?&lt;/P&gt;&lt;P&gt;Expression would look sometime like this...&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Channel = {'Banking App'},CostName={'Prev_Yr_Actuals'},Period=, FY={"=$(YourSolution)"}&amp;gt;}Value)...&lt;/P&gt;&lt;P&gt;(The FY field is a dual field.)&lt;/P&gt;&lt;P&gt;in Short - I want the same behavior that we mimicked on Open Event, to happen if a user didnt make a selection on FY.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;(I have created a separate thread for this question -&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/Syntax-using-FirstSortedValue-in-set-Analysis/m-p/1795617#M1211177" target="_blank"&gt;https://community.qlik.com/t5/QlikView-App-Dev/Syntax-using-FirstSortedValue-in-set-Analysis/m-p/1795617#M1211177&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 10:33:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Opening-Event-in-Doc-not-working/m-p/1795550#M1211168</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2021-03-30T10:33:21Z</dc:date>
    </item>
  </channel>
</rss>

