<?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: Re: bar chart &amp; button combination problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/bar-chart-button-combination-problem/m-p/735797#M1064029</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample with the button you descibe and a conditional expression that shows the regular current selections vs only last 12 months&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 2 buttons. They both set the variable&amp;nbsp; vToggle. They both have a layout show/hide condition. The button that sets to 'current selections' only shows when vToggle='Last 12 Months' and vice versa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use a data calendar that numbers the months sequentially from oldest monthyear (1) to latest monthyear (in this case 83)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; [Transaction ID], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Gross Margin], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year(Date)*100 + month(Date) as YearMonth&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MonthCalendar:&lt;/P&gt;&lt;P&gt;load Distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp; AutoNumber(YearMonth) as MonthSequenceNumber,&lt;/P&gt;&lt;P&gt;&amp;nbsp; YearMonth&lt;/P&gt;&lt;P&gt;Resident Data&lt;/P&gt;&lt;P&gt;Order by YearMonth Asc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a variable that stores the current month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vCurrentMonth:&amp;nbsp;&amp;nbsp;&amp;nbsp; =max(MonthSequenceNumber)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression for last 12 months in the chart is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (vToggle='Current Selections', &lt;/P&gt;&lt;P&gt;&amp;nbsp; sum(Sales),&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( vToggle='Last 12 Months',&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum( {$&amp;lt;Date=,YearMonth=,MonthSequenceNumber={'&amp;gt;=$(=vCurrentMonth-12)'}&amp;gt;}&amp;nbsp; Sales)&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here are the screenshots&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/67144_Capture.PNG.png" style="width: 620px; height: 317px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then press ' show last 12 months' and get this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(button is toggled and the chart is filterd to last 12 months)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture1.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/67160_Capture1.PNG.png" style="width: 620px; height: 251px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Sep 2014 03:16:37 GMT</pubDate>
    <dc:creator>JonnyPoole</dc:creator>
    <dc:date>2014-09-19T03:16:37Z</dc:date>
    <item>
      <title>bar chart &amp; button combination problem</title>
      <link>https://community.qlik.com/t5/QlikView/bar-chart-button-combination-problem/m-p/735794#M1064026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have one bar chart and one button in that button two clicks are their one is current selection and another one is 12 months&lt;/P&gt;&lt;P&gt;if i click the current selection the bar chart it display the current seletion data . and once again click 12 months it display current selection-12 months data in bar chart. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am calculating the both current selection and 12 months in bar chart . in button object wrote this code like if(vtogle_something='last',12months,current selection)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i m using this code to write the expression in bar chart&amp;nbsp; like (if vtogle_some='last',&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;i don't next&amp;nbsp; &lt;/STRONG&gt;and also using t&lt;STRONG&gt;he condition(expression like rate%) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count( if(op_status='won',op_status))/count(op_status)&lt;/STRONG&gt; to display the bar chart corresponding clicks in one button object plz tell me the working expression........plz........urgent&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2014 00:36:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bar-chart-button-combination-problem/m-p/735794#M1064026</guid>
      <dc:creator />
      <dc:date>2014-09-19T00:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: bar chart &amp; button combination problem</title>
      <link>https://community.qlik.com/t5/QlikView/bar-chart-button-combination-problem/m-p/735795#M1064027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a sample QVW? &lt;/P&gt;&lt;P&gt;i kind of got your intention of the button click. It will be easy for me to solve in your sample QVW rather than me creating a sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2014 00:42:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bar-chart-button-combination-problem/m-p/735795#M1064027</guid>
      <dc:creator>phaneendra_kunc</dc:creator>
      <dc:date>2014-09-19T00:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: bar chart &amp; button combination problem</title>
      <link>https://community.qlik.com/t5/QlikView/bar-chart-button-combination-problem/m-p/735796#M1064028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to write the expression in bar chart plz tell me......don't have any sample dashboard &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2014 02:33:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bar-chart-button-combination-problem/m-p/735796#M1064028</guid>
      <dc:creator />
      <dc:date>2014-09-19T02:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Re: bar chart &amp; button combination problem</title>
      <link>https://community.qlik.com/t5/QlikView/bar-chart-button-combination-problem/m-p/735797#M1064029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample with the button you descibe and a conditional expression that shows the regular current selections vs only last 12 months&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 2 buttons. They both set the variable&amp;nbsp; vToggle. They both have a layout show/hide condition. The button that sets to 'current selections' only shows when vToggle='Last 12 Months' and vice versa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use a data calendar that numbers the months sequentially from oldest monthyear (1) to latest monthyear (in this case 83)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; [Transaction ID], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Gross Margin], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year(Date)*100 + month(Date) as YearMonth&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MonthCalendar:&lt;/P&gt;&lt;P&gt;load Distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp; AutoNumber(YearMonth) as MonthSequenceNumber,&lt;/P&gt;&lt;P&gt;&amp;nbsp; YearMonth&lt;/P&gt;&lt;P&gt;Resident Data&lt;/P&gt;&lt;P&gt;Order by YearMonth Asc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a variable that stores the current month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vCurrentMonth:&amp;nbsp;&amp;nbsp;&amp;nbsp; =max(MonthSequenceNumber)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression for last 12 months in the chart is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (vToggle='Current Selections', &lt;/P&gt;&lt;P&gt;&amp;nbsp; sum(Sales),&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( vToggle='Last 12 Months',&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum( {$&amp;lt;Date=,YearMonth=,MonthSequenceNumber={'&amp;gt;=$(=vCurrentMonth-12)'}&amp;gt;}&amp;nbsp; Sales)&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here are the screenshots&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/67144_Capture.PNG.png" style="width: 620px; height: 317px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then press ' show last 12 months' and get this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(button is toggled and the chart is filterd to last 12 months)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture1.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/67160_Capture1.PNG.png" style="width: 620px; height: 251px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2014 03:16:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bar-chart-button-combination-problem/m-p/735797#M1064029</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-19T03:16:37Z</dc:date>
    </item>
  </channel>
</rss>

