<?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: Barchart Question in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Barchart-Question/m-p/1635257#M47327</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use function &lt;EM&gt;GetSelectedCount(&amp;lt;dimension&amp;gt;)&lt;/EM&gt; to see if there is any current selections on fields Year/ Month/ Date. From this result, you can use an IF condition to decide whether to show all dates or default to 6 latest months.&lt;/P&gt;&lt;P&gt;For example, with this expression as a calculated dimension in your bar chart:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;=If(GetSelectedCount(AdminDate) &amp;gt; 0, [AdminDate], 
     If([AdminDate] &amp;gt;= AddMonths(AdminDate(), -6), [AdminDate]))&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;If there is a current selection on field&amp;nbsp;AdminDate, it shows all values of AdminDate in the dimension&lt;/LI&gt;&lt;LI&gt;If&amp;nbsp;there is no selection, it defaults to dates of 6 latest months&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;You can add Year, Month to the expression similarly as needed.&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Vu Nguyen&lt;/P&gt;</description>
    <pubDate>Tue, 15 Oct 2019 08:29:34 GMT</pubDate>
    <dc:creator>vunguyenq89</dc:creator>
    <dc:date>2019-10-15T08:29:34Z</dc:date>
    <item>
      <title>Barchart Question</title>
      <link>https://community.qlik.com/t5/App-Development/Barchart-Question/m-p/1634942#M47298</link>
      <description>&lt;P&gt;I would like to have a Barchart default to X number of months but then still allow the user to select dates (years, months ) that will change the chart. I have been reviewing some solutions, and what I found so far is the ability to limit a Barchart to X number of months, but then the selections do not work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is what I am trying possible, or by limiting the Barchart to show X number of months, I take away the ability to have the end-user to select other dates for that chart?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did try this in the dimension of the chart. It limits tothe last six months but does not allow for additional date selections.&lt;/P&gt;&lt;P&gt;&amp;nbsp;=If([AdminDate] &amp;gt;= AddMonths(Today(), -6), [AdminDate])&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 13:39:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Barchart-Question/m-p/1634942#M47298</guid>
      <dc:creator>raylang1</dc:creator>
      <dc:date>2019-10-14T13:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart Question</title>
      <link>https://community.qlik.com/t5/App-Development/Barchart-Question/m-p/1635246#M47324</link>
      <description>&lt;P&gt;I suggest to use Max(Total Date) instead of Today():&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If([AdminDate] &amp;gt;= AddMonths(Today(), -6), [AdminDate])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Then, you can always get 6 most recent month from the last day of your selection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also replace - 6 on above formular by a variable, and end user can edit the variable by a variable input extension, then it's more flexible to control how many months will be showed. (it is same to define a variable in fixed number limitation of dimension).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 07:56:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Barchart-Question/m-p/1635246#M47324</guid>
      <dc:creator>thi_pham</dc:creator>
      <dc:date>2019-10-15T07:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart Question</title>
      <link>https://community.qlik.com/t5/App-Development/Barchart-Question/m-p/1635257#M47327</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use function &lt;EM&gt;GetSelectedCount(&amp;lt;dimension&amp;gt;)&lt;/EM&gt; to see if there is any current selections on fields Year/ Month/ Date. From this result, you can use an IF condition to decide whether to show all dates or default to 6 latest months.&lt;/P&gt;&lt;P&gt;For example, with this expression as a calculated dimension in your bar chart:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;=If(GetSelectedCount(AdminDate) &amp;gt; 0, [AdminDate], 
     If([AdminDate] &amp;gt;= AddMonths(AdminDate(), -6), [AdminDate]))&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;If there is a current selection on field&amp;nbsp;AdminDate, it shows all values of AdminDate in the dimension&lt;/LI&gt;&lt;LI&gt;If&amp;nbsp;there is no selection, it defaults to dates of 6 latest months&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;You can add Year, Month to the expression similarly as needed.&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Vu Nguyen&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 08:29:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Barchart-Question/m-p/1635257#M47327</guid>
      <dc:creator>vunguyenq89</dc:creator>
      <dc:date>2019-10-15T08:29:34Z</dc:date>
    </item>
  </channel>
</rss>

