<?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: automatically select last 10 quarters in chart on sheet opening in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/automatically-select-last-10-quarters-in-chart-on-sheet-opening/m-p/2442874#M97456</link>
    <description>&lt;P&gt;IMO each kind of action-magic raised more challenges as it would be solving. If any possible you should try to avoid such approaches.&lt;/P&gt;
&lt;P&gt;Ideally the user selects always directly all the wanted data. This may in this case simply a search like:&lt;/P&gt;
&lt;P&gt;&amp;lt;=10&lt;/P&gt;
&lt;P&gt;against a continuous quarter-field - like yours only with the opposite direction and starting with 0 or 1 by the current one which would mostly avoid to query a max() value of it and if such logic is really needed it could be caught with min() in the opposite direction. A search like the &amp;gt;=10 might be also directly stored before closing the application or called with a bookmark.&lt;/P&gt;
&lt;P&gt;Further possible would be to cluster such fields with class() or with conditional approaches like pick(match()) respectively if-loops, for example (with an appropriate running field of Q):&lt;/P&gt;
&lt;P&gt;pick(match(-1, Q = 0, Q &amp;lt;= 10, ...), 'current', 'last 10', ...)&lt;/P&gt;
&lt;P&gt;and by using specialized dimensions of&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/The-As-Of-Table/ba-p/1466130" target="_blank"&gt;The As-Of Table - Qlik Community - 1466130&lt;/A&gt;&amp;nbsp;you may combine multiple flags and/or cluster to provide the user all common period-requirements like YTD, MTD, LYTD, ... within a single selection.&lt;/P&gt;
&lt;P&gt;Beside this I suggest to consider to move the condition from the (calculated) dimension into the expression which would enable approaches like:&lt;/P&gt;
&lt;P&gt;sum({&amp;lt; Q &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;*&lt;/STRONG&gt;&lt;/FONT&gt;= {"&amp;gt;0&amp;lt;=10 "}&amp;gt;} Sales)&lt;/P&gt;</description>
    <pubDate>Fri, 19 Apr 2024 10:10:51 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2024-04-19T10:10:51Z</dc:date>
    <item>
      <title>automatically select last 10 quarters in chart on sheet opening</title>
      <link>https://community.qlik.com/t5/App-Development/automatically-select-last-10-quarters-in-chart-on-sheet-opening/m-p/2442838#M97455</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a bar chart showing sales volume per quarter (quarters on the x-axis)&lt;/P&gt;
&lt;P&gt;currently the chart is fixed to always show the last 10 quarters, but ideally I would like to make it flexible, so that the users can select the quarters visible on their own, but when opening the sheet initially I would like to have the last 10 quarters selected automatically..&lt;/P&gt;
&lt;P&gt;As the FYFQ field is a string like FY23-Q1, I additionally created a FYFQ_Row field which is a number count. Meaning 1 is the oldest FYFQ available and the highest number is the most recent FYFQ.&lt;/P&gt;
&lt;P&gt;currently the chart is fixed to show always the last 10 quarters with the following dimension "if(FYFQ_Row &amp;gt; v_maxFYQ-10 and FYFQ_Row &amp;lt;= v_maxFYQ, FYFQ)" where "v_maxFYQ is defined as max(FYFQ_Row)&lt;/P&gt;
&lt;P&gt;this works perfectly fine.&lt;/P&gt;
&lt;P&gt;but my question is now the following:&amp;nbsp;&lt;BR /&gt;when changing the dimension to "FYFQ" obviously the chart will show all quarters available.&lt;BR /&gt;I know that through Sheet Actions I can add actions that are performed on opening of the sheet, like select a specific field value, etc.&lt;/P&gt;
&lt;P&gt;But is it possible to somehow make the selection from above dimension on sheet opening. Meaning can I automatically select the last 10 quarters in the FYFQ field on sheet opening?&lt;/P&gt;
&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 08:53:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/automatically-select-last-10-quarters-in-chart-on-sheet-opening/m-p/2442838#M97455</guid>
      <dc:creator>tobiasaechter</dc:creator>
      <dc:date>2024-04-19T08:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: automatically select last 10 quarters in chart on sheet opening</title>
      <link>https://community.qlik.com/t5/App-Development/automatically-select-last-10-quarters-in-chart-on-sheet-opening/m-p/2442874#M97456</link>
      <description>&lt;P&gt;IMO each kind of action-magic raised more challenges as it would be solving. If any possible you should try to avoid such approaches.&lt;/P&gt;
&lt;P&gt;Ideally the user selects always directly all the wanted data. This may in this case simply a search like:&lt;/P&gt;
&lt;P&gt;&amp;lt;=10&lt;/P&gt;
&lt;P&gt;against a continuous quarter-field - like yours only with the opposite direction and starting with 0 or 1 by the current one which would mostly avoid to query a max() value of it and if such logic is really needed it could be caught with min() in the opposite direction. A search like the &amp;gt;=10 might be also directly stored before closing the application or called with a bookmark.&lt;/P&gt;
&lt;P&gt;Further possible would be to cluster such fields with class() or with conditional approaches like pick(match()) respectively if-loops, for example (with an appropriate running field of Q):&lt;/P&gt;
&lt;P&gt;pick(match(-1, Q = 0, Q &amp;lt;= 10, ...), 'current', 'last 10', ...)&lt;/P&gt;
&lt;P&gt;and by using specialized dimensions of&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/The-As-Of-Table/ba-p/1466130" target="_blank"&gt;The As-Of Table - Qlik Community - 1466130&lt;/A&gt;&amp;nbsp;you may combine multiple flags and/or cluster to provide the user all common period-requirements like YTD, MTD, LYTD, ... within a single selection.&lt;/P&gt;
&lt;P&gt;Beside this I suggest to consider to move the condition from the (calculated) dimension into the expression which would enable approaches like:&lt;/P&gt;
&lt;P&gt;sum({&amp;lt; Q &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;*&lt;/STRONG&gt;&lt;/FONT&gt;= {"&amp;gt;0&amp;lt;=10 "}&amp;gt;} Sales)&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 10:10:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/automatically-select-last-10-quarters-in-chart-on-sheet-opening/m-p/2442874#M97456</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-04-19T10:10:51Z</dc:date>
    </item>
  </channel>
</rss>

