<?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 How do you toggle between expressions for sorting in a bar chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247575#M94292</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a bar chart with three expressions.&amp;nbsp; One for current year, last year and growth.&amp;nbsp; I have a users who wants to be able to sort by any of these three expressions.&amp;nbsp; Basically have the option to select which expression to sort by.&amp;nbsp; Right now, it seems I can only sort by one expression without an ability to change at the end user level.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="8-3-2011 9-39-01 AM.jpg" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/6270_8-3-2011+9-39-01+AM.jpg" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Aug 2011 16:44:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-03T16:44:11Z</dc:date>
    <item>
      <title>How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247575#M94292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a bar chart with three expressions.&amp;nbsp; One for current year, last year and growth.&amp;nbsp; I have a users who wants to be able to sort by any of these three expressions.&amp;nbsp; Basically have the option to select which expression to sort by.&amp;nbsp; Right now, it seems I can only sort by one expression without an ability to change at the end user level.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="8-3-2011 9-39-01 AM.jpg" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/6270_8-3-2011+9-39-01+AM.jpg" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 16:44:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247575#M94292</guid>
      <dc:creator />
      <dc:date>2011-08-03T16:44:11Z</dc:date>
    </item>
    <item>
      <title>How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247576#M94293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe create a "sort by" field with the labels for your three expressions as values.&amp;nbsp; Then use that to pick the correct sort expression in the chart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 19:51:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247576#M94293</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-03T19:51:58Z</dc:date>
    </item>
    <item>
      <title>How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247577#M94294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a similar problem but I need to toggle ( or enable ) various lines in a line chart based on the selections I make on a field. I explain in detail : I get periodic ( weekly ) data extractions from SAP ( same report with same data fields basically ) with a product sales forecast per month. Concatenating all these extractions I create a calculated field called Week_Nr ( with values 1,2,3...etc, corresponding to the week when the data is extracted ). What I need is to setup a line chart to be able to trend over time the cumulative product sales on the different weeks that I select in the Week_Nr field.&lt;/P&gt;&lt;P&gt;For example I would like to see 2 trend lines ( one corresponding to the data taken on week 7 and a second line showing the data taken on week 8 ) ...this way I could do deviation analysis comparing the forecast on different weeks....similarly I would like to be able to select 3, 4 ..weeks ..or 2 non consecutive weeks for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this moment I managed to display 2 lines using 2 expressions in the chart setup and with Set Analysis ( so the first expression is plotting the data when Week_Nr=7 ( using a set modifier )..and similarly the second expression for Week_Nr=8 ( with a set modifier as well ). So how could I make these set modifiers kind of dynamic or linked to whatever week I manually select in the Week_Nr field ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate any help&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Enrique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 23:28:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247577#M94294</guid>
      <dc:creator>quiquehm</dc:creator>
      <dc:date>2012-02-29T23:28:45Z</dc:date>
    </item>
    <item>
      <title>How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247578#M94295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I once had a similar requirement, and solved it by creating a macro (assigned to a button) that was changing chart properties.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 02:36:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247578#M94295</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-01T02:36:58Z</dc:date>
    </item>
    <item>
      <title>How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247579#M94296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Michael, could you please give me the macro details to see how to do it. Unfortunatelty I never worked with macros in Qlikview. &lt;/P&gt;&lt;P&gt;Anyone has any other trick without using macros ? &lt;/P&gt;&lt;P&gt;Appreciate your help&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Enrique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 08:48:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247579#M94296</guid>
      <dc:creator>quiquehm</dc:creator>
      <dc:date>2012-03-01T08:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247580#M94297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I probably don't understand what you're asking for, but here's a graph that shows detail plus selectable weekly trend lines without using macros or set analysis.&amp;nbsp; You can show the detail for all weeks, but a trend line for the first week, and a separate trend line for the third week.&amp;nbsp; I've used gray for the section of the trend line representing the days used to calculate that trend.&amp;nbsp; There may be better ways to make that information clear - it was just the first thing that occurred to me.&amp;nbsp; This approach is using some data connected by if(), so it would be probably be unacceptably slow for large data sets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 19:35:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247580#M94297</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-03-01T19:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247581#M94298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you John ! It really looks like the way I need it. Based on the selected values of a Field ( In your case TrendLine ) you show/hide the corresponding trend lines on the chart. The only problem is in my case I am not too sure how to configure the script, I believe it´s maybe much more simple : The data I have is as follows : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 384px;"&gt;&lt;TBODY&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl66" height="20" style="height: 15pt; width: 48pt;" width="64"&gt;DataSet&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; width: 48pt;" width="64"&gt;Jan&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; width: 48pt;" width="64"&gt;Feb&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; width: 48pt;" width="64"&gt;March&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; width: 48pt;" width="64"&gt;Apr&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; width: 48pt;" width="64"&gt;May&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl65" height="20" style="height: 15pt; border-top: medium none;"&gt;FW07&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;20&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;15&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;20&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;10&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl65" height="20" style="height: 15pt; border-top: medium none;"&gt;FW08&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;20&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;15&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;25&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;15&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl65" height="20" style="height: 15pt; border-top: medium none;"&gt;FW09&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;15&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;15&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;20&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;12&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;33&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl65" height="20" style="height: 15pt; border-top: medium none;"&gt;FW10&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;15&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;15&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;20&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;12&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;33&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl65" height="20" style="height: 15pt; border-top: medium none;"&gt;FW11&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;20&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;15&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;25&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;15&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in my case the Field where I would select the trend lines to be displayed is DataSet. I know how to convert above table to a tabular list ( using load crosstable ), so I would have 3 fields ( DataSet, Month, Sales ). For the sales amounts I would need to set Accumulation in the Expression settings ( to have a proper trend line, accumulating the values ). The DataSet just represents the data extraction from SAP ( one snapshot report per week for example..this is why these are called FW07, FW08 ....etc ( fiscal weeks ). &lt;/P&gt;&lt;P&gt;I hope it is better explained now . Any help of setting up the script/chart using this table ? Thanks a lot for your help&lt;/P&gt;&lt;P&gt;Enrique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 22:40:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247581#M94298</guid>
      <dc:creator>quiquehm</dc:creator>
      <dc:date>2012-03-01T22:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247582#M94299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say I select FW07 and FW08 for that data.&amp;nbsp; A simple line chart with a default trend line and full accumulation does this.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="TrendLines.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/11849_TrendLines.png" /&gt;&lt;/P&gt;&lt;P&gt;I assume that's not what you want, but what do you want it to look like instead?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 23:06:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247582#M94299</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-03-02T23:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247583#M94300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the misunderstanding.I used the words trend lines incorrectly.What I simply need are the 2 lines in the chart, one for FW07 and one for FW08...or for any other FW selected.How can i setup the script for that?thanks for the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Mar 2012 00:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247583#M94300</guid>
      <dc:creator>quiquehm</dc:creator>
      <dc:date>2012-03-03T00:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247584#M94301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understood, then you set it up in the script as you've already said:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;"( using load crosstable ), so I would have 3 fields ( DataSet, Month, Sales )"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The chart would have dimensions Month and DataSet, expression sum(Sales), and have full accumulation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It may take a little effort to get your Month field working right.&amp;nbsp; The attached example shows one way, but it makes some assumptions about how your data is really set up.&amp;nbsp; Here's the script, and there might be a way to do it in one step, but doing a preceeding load with a crosstable has never worked for me for whatever reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SalesTemp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CROSSTABLE (Month, Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD * INLINE [ &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DataSet 'Jan 2012' 'Feb 2012' 'Mar 2012' 'Apr 2012' 'May 2012'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FW07 20 15 20 10 50 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FW08 20 15 25 15 55 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FW09 15 15 20 12 33 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FW10 15 15 20 12 33 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FW11 20 15 25 15 55 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;] (delimiter is ' ')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Sales:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;NOCONCATENATE &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DataSet&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(date#(Month,'MMM YYYY'),'MMM YYYY') as Month&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Sales&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT SalesTemp&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DROP TABLE SalesTemp&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Mar 2012 00:30:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247584#M94301</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-03-03T00:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247585#M94302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John, thanks a lot for your help. In reality it was not that complicated to setup, your script is crystal clear. The thing is the more functions I discover in Qlikview the more difficult way I try to do things...and it shouldn´t be like that. Anyway what I would like to do next is a deviation analysis between two datasets I select ( for example if I select FW10 and FW09 I would like to see the "delta" sales between these two datasets. I modified a bit your qvw file and setup a combo chart, to display bars for the monthly sales forecast ( no accumulation ) and a line for accumulated sales forecast. Then I would like to display the monthly difference between the bars ( deviation graph ).&lt;/P&gt;&lt;P&gt;One way I thought about doing it was using set analysis for the bars expression, for example like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum( {&amp;lt;DataSet={FW10}&amp;gt;} Sales ) - sum( {&amp;lt;DataSet={FW09}&amp;gt;} Sales ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem with this is that expression is static ( I mean if I change my DataSet selections to other two pairs of weeks like FW11 and FW10, nothing would change in the chart ). Do you know how I could make these set analysis "kind of dynamic" to use the selections I make in the DataSet field....like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum( {&amp;lt;DataSet={&lt;SPAN style="color: #333333;"&gt;&lt;EM&gt;Whatever field value1 I select in DataSet field&lt;/EM&gt;&lt;/SPAN&gt;}&amp;gt;} Sales ) - sum( {&amp;lt;DataSet={&lt;EM&gt;Whatever field value2 I select in DataSet field&lt;/EM&gt;}&amp;gt;}Sales )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;( being field value1 bigger than field value 2 of course ). Also if this is possible ....would it also be possible once you select a field value 1 ( for example FW10 ) that the expression used for field value 2 the value inmediately preceding field value 1 ( in this case FW09 ) ....or FW08 in case FW09 did not exist in the list ? could this behaviour be automated in the expression somehow ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thanks for your time and your great help in this forum&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Enrique&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.D.:One little detail is an annoyance I find in 2 line charts when values are too close , obviously the numbers on data points overlapp ..making difficult reading...any solution to this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Combochart.JPG" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/11909_Combochart.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 12:12:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247585#M94302</guid>
      <dc:creator>quiquehm</dc:creator>
      <dc:date>2012-03-06T12:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247586#M94303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know how to keep the numbers from overlapping.&amp;nbsp; QlikView seems a bit lacking in that regard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To compare two selected data sets:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;DataSet={'$(=maxstring(DataSet))'}&amp;gt;} Sales) -&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;DataSet={'$(=minstring(DataSet))'}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To compare a data set to the previous data set, I'd probably create a data set sequence so as to not be messing around with strings.&amp;nbsp; But here's a string approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;DataSet={'$(=maxstring(DataSet))'}&amp;gt;} Sales) -&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;DataSet={'$(='FW'&amp;amp;num(right(maxstring(DataSet),2)-1,'00'))'}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 17:42:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247586#M94303</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-03-06T17:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247587#M94304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you John, it´s great, it does exactly what I need. The only issue I found is when I remove one of the DataSets ( for example FW08 ) from the script and leave the others ( FW07, FW09, FW10 and FW11 ) ( it may happen that on FW08 there was not a DataSet available ) , obviously ( and looking at your string approach below ), when selecting FW09, it does not work ( because it is expecting to find FW08 to make the calculation ), so it just displays the values on FW09 and not the difference between FW09 and FW07 ( the inmediate preceding available DataSet ).&lt;/P&gt;&lt;P&gt;Not sure there is a workaround for that.&lt;/P&gt;&lt;P&gt;Thanks again for your expert help. I attached the qvw file where I removed FW08 on purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new, courier;"&gt;sum({&amp;lt;DataSet={'$(=maxstring(DataSet))'}&amp;gt;} Sales) -&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier;"&gt;sum({&amp;lt;DataSet={'$(='FW'&amp;amp;num(right(maxstring(DataSet),2)-1,'00'))'}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2012 13:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247587#M94304</guid>
      <dc:creator>quiquehm</dc:creator>
      <dc:date>2012-03-09T13:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247588#M94305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The workaround is doing what I suggested, "create a data set sequence".&amp;nbsp; The sequence number can be sequential, and thus not have the same problems that the text description has.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2012 15:51:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247588#M94305</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-03-09T15:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247589#M94306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks, I will try to figure out how to do the sequence. I understand basically I need to replace the sequence FW07, FW08, FW10,FW11,FW13.....etc by simple sequential numbers 1,2,3,4,5,6,...etc. I will see if I can create another field called DataSet_Seq that autoincrements by 1 everytime a new DataSet is available.&lt;/P&gt;&lt;P&gt;Thanks again for your time and all the tips and tricks.&lt;/P&gt;&lt;P&gt;Enrique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2012 08:22:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247589#M94306</guid>
      <dc:creator>quiquehm</dc:creator>
      <dc:date>2012-03-12T08:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do you toggle between expressions for sorting in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247590#M94307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If figuring out a sequence number when adding each data set proves difficult, I think that you could do this after they've all been loaded.&amp;nbsp; I'm not certain what sort order the fieldvalue() uses.&amp;nbsp; My guess is load order or maybe alphabetical.&amp;nbsp; That might or might not be right, so you might need to add some sorting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DataSetSequences:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;recno() as DataSetSequence&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,text(fieldvalue('DataSet',recno())) as DataSet&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE fieldvaluecount('DataSet')&lt;/SPAN&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2012 17:06:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-toggle-between-expressions-for-sorting-in-a-bar-chart/m-p/247590#M94307</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-03-12T17:06:36Z</dc:date>
    </item>
  </channel>
</rss>

