<?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: Bar Chart to show last 6months data respective to monthyear selection in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Bar-Chart-to-show-last-6months-data-respective-to-monthyear/m-p/1259618#M25616</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share your .qvw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Mar 2017 12:48:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-03-22T12:48:02Z</dc:date>
    <item>
      <title>Bar Chart to show last 6months data respective to monthyear selection</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-to-show-last-6months-data-respective-to-monthyear/m-p/1259617#M25615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Hi All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Am trying to show the last 6months data in bar chart in QlikSense. &lt;/SPAN&gt;&lt;SPAN style="color: #3366ff;"&gt;When I select a MonthAndYear value the bar chart should show last 6 months data from the point of selection. &lt;/SPAN&gt;&lt;SPAN style="color: #3366ff;"&gt;Example: If I select Feb2017 in MonthAndYear list box, then bar chart should show last 6 months from Feb2017.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;By default it should show the last 6 months from the current month (date(max(MDate),'date format'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;I have created the fields like below in calendar,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;date(date#(TempDate,'MM/DD/YYYY'),'MMM|DD|YYYY') as MDate, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; Month(TempDate) AS Month,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; Year(TempDate) AS Year,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp; MonthName(TempDate) as MonthAndYear&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;On UI, I have a list box for MonthAndYear and a Bar chart. Am using below expression in Bar chart with Dimension as MonthAndYear field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((((sum({&amp;lt;[MID] = {6},MonthAndYear={"&amp;gt;$(=date(addmonths(max(MonthAndYear),-6),'MMM YYYY')) &amp;lt;=$(=date(max(MonthAndYear),'MMM YYYY'))"}&amp;gt;}value))&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;(sum({&amp;lt;[MID] = {9},MonthAndYear={"&amp;gt;$(=date(addmonths(max(MonthAndYear),-6),'MMM YYYY')) &amp;lt;=$(=date(max(MonthAndYear),'MMM YYYY'))"}&amp;gt;}value))&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;(sum({&amp;lt;[MID] = {8},MonthAndYear={"&amp;gt;$(=date(addmonths(max(MonthAndYear),-6),'MMM YYYY')) &amp;lt;=$(=date(max(MonthAndYear),'MMM YYYY'))"}&amp;gt;}value))&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;(sum({&amp;lt;[M ID] = {7},MonthAndYear={"&amp;gt;$(=date(addmonths(max(MonthAndYear),-6),'MMM YYYY')) &amp;lt;=$(=date(max(MonthAndYear),'MMM YYYY'))"}&amp;gt;}value)))* only({&amp;lt;CompositeMetric = {'DRI'}&amp;gt;} MWeight))&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;((sum({&amp;lt;[MID] = {3},MonthAndYear={"&amp;gt;$(=date(addmonths(max(MonthAndYear),-6),'MMM YYYY')) &amp;lt;=$(=date(max(MonthAndYear),'MMM YYYY'))"}&amp;gt;}value))* only({&amp;lt;CMetric={'SCR'}&amp;gt;}MWeight)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;This above expression gives the error 'Selections generated no data for this chart'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;The other way like below worked statically but cant show last 6months with respect to MonthAndYear selection. Rather it shows only for the selected MonthAndYear.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(((((sum({&amp;lt;[MID] = {6},[MDate]={"&amp;gt;$(=date(addmonths(max([MDate]),-6),'MMM|DD|YYYY')) &amp;lt;=$(=date(max([MDate]),'MMM|DD|YYYY'))"}&amp;gt;}value))&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;(sum({&amp;lt;[MID] = {9},[MDate]={"&amp;gt;$(=date(addmonths(max([MDate]),-6),'MMM|DD|YYYY')) &amp;lt;=$(=date(max([MDate]),'MMM|DD|YYYY'))"}&amp;gt;}value))&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;(sum({&amp;lt;[MID] = {8},[MDate]={"&amp;gt;$(=date(addmonths(max([MDate]),-6),'MMM|DD|YYYY')) &amp;lt;=$(=date(max([MDate]),'MMM|DD|YYYY'))"}&amp;gt;}value))&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;(sum({&amp;lt;[MID] = {7},[MDate]={"&amp;gt;$(=date(addmonths(max([MDate]),-6),'MMM|DD|YYYY')) &amp;lt;=$(=date(max([MDate]),'MMM|DD|YYYY'))"}&amp;gt;}value)))* only({&amp;lt;CMetric = {'DRI'}&amp;gt;} MWeight))&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;((sum({&amp;lt;[MID] = {3},[MDate]={"&amp;gt;$(=date(addmonths(max([MDate]),-6),'MMM|DD|YYYY')) &amp;lt;=$(=date(max([MDate]),'MMM|DD|YYYY'))"}&amp;gt;}value))* only({&amp;lt;CMetric={'SCR'}&amp;gt;}MWeight)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Please help me to solve this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Praveen&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 12:36:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-to-show-last-6months-data-respective-to-monthyear/m-p/1259617#M25615</guid>
      <dc:creator>praveenak</dc:creator>
      <dc:date>2017-03-22T12:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Chart to show last 6months data respective to monthyear selection</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-to-show-last-6months-data-respective-to-monthyear/m-p/1259618#M25616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share your .qvw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 12:48:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-to-show-last-6months-data-respective-to-monthyear/m-p/1259618#M25616</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-22T12:48:02Z</dc:date>
    </item>
  </channel>
</rss>

