<?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 Sorting a Stacked Bar with Set Analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387391#M31825</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All - I have what I hope is an easy question.&amp;nbsp; Though I've hit a wall.&amp;nbsp; I have a rather simple set of data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="288" style="width: 518px; height: 281px;" width="518"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="19" width="88"&gt;&lt;STRONG&gt;Document_ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" width="105"&gt;&lt;STRONG&gt;Keyword&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;&lt;STRONG&gt;Major&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" width="96"&gt;&lt;STRONG&gt;Term&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;1234&lt;/TD&gt;&lt;TD&gt;Test&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;1234&lt;/TD&gt;&lt;TD&gt;Test&lt;/TD&gt;&lt;TD&gt;Minor&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;4567&lt;/TD&gt;&lt;TD&gt;Test 2&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Something Else&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;4567&lt;/TD&gt;&lt;TD&gt;Test 2&lt;/TD&gt;&lt;TD&gt;Minor&lt;/TD&gt;&lt;TD&gt;Something Else&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;4567&lt;/TD&gt;&lt;TD&gt;Test&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;1111&lt;/TD&gt;&lt;TD&gt;Test 3&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;2222&lt;/TD&gt;&lt;TD&gt;Test 3&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;3333&lt;/TD&gt;&lt;TD&gt;Test 3&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;4444&lt;/TD&gt;&lt;TD&gt;Test 3&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;5555&lt;/TD&gt;&lt;TD&gt;Test&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;5555&lt;/TD&gt;&lt;TD&gt;Test&lt;/TD&gt;&lt;TD&gt;Minor&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;One document could have many keywords that are either major or minor (or have the same keyword marked both ways).&amp;nbsp; The keywords are grouped into Terms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to create a sheet that shows a stacked bar counting the keywords by distinct document ID for only the Term "Side Effect".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I do this as a regular bar chart with Keyword as a dimension and a measure of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({$&amp;lt;Term={"Side Effect"}&amp;gt;} DISTINCT Document_ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works great.&amp;nbsp; I'm sorting by keyword in descending order.&amp;nbsp; "Sort by expression" using the same formula as the measure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/174721_pastedImage_8.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;As soon as I add another dimension (Major) and stack it I get unexpected results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/174725_pastedImage_10.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;I'm using the same measure and sort formula.&amp;nbsp; I would have thought that "Test 2" would be excluded since there is none with a Term of "Side Effect".&amp;nbsp; The sort is also off as it's counting the distinct Document ID by Major AND Keyword now and appending them together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm guessing this is a misunderstanding of set analysis on my part.&amp;nbsp; Any advice or direction appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source data and QVF attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Aug 2017 17:44:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-25T17:44:55Z</dc:date>
    <item>
      <title>Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387391#M31825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All - I have what I hope is an easy question.&amp;nbsp; Though I've hit a wall.&amp;nbsp; I have a rather simple set of data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="288" style="width: 518px; height: 281px;" width="518"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="19" width="88"&gt;&lt;STRONG&gt;Document_ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" width="105"&gt;&lt;STRONG&gt;Keyword&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;&lt;STRONG&gt;Major&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" width="96"&gt;&lt;STRONG&gt;Term&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;1234&lt;/TD&gt;&lt;TD&gt;Test&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;1234&lt;/TD&gt;&lt;TD&gt;Test&lt;/TD&gt;&lt;TD&gt;Minor&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;4567&lt;/TD&gt;&lt;TD&gt;Test 2&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Something Else&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;4567&lt;/TD&gt;&lt;TD&gt;Test 2&lt;/TD&gt;&lt;TD&gt;Minor&lt;/TD&gt;&lt;TD&gt;Something Else&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;4567&lt;/TD&gt;&lt;TD&gt;Test&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;1111&lt;/TD&gt;&lt;TD&gt;Test 3&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;2222&lt;/TD&gt;&lt;TD&gt;Test 3&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;3333&lt;/TD&gt;&lt;TD&gt;Test 3&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;4444&lt;/TD&gt;&lt;TD&gt;Test 3&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;5555&lt;/TD&gt;&lt;TD&gt;Test&lt;/TD&gt;&lt;TD&gt;Major&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="19"&gt;5555&lt;/TD&gt;&lt;TD&gt;Test&lt;/TD&gt;&lt;TD&gt;Minor&lt;/TD&gt;&lt;TD&gt;Side Effect&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;One document could have many keywords that are either major or minor (or have the same keyword marked both ways).&amp;nbsp; The keywords are grouped into Terms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to create a sheet that shows a stacked bar counting the keywords by distinct document ID for only the Term "Side Effect".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I do this as a regular bar chart with Keyword as a dimension and a measure of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({$&amp;lt;Term={"Side Effect"}&amp;gt;} DISTINCT Document_ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works great.&amp;nbsp; I'm sorting by keyword in descending order.&amp;nbsp; "Sort by expression" using the same formula as the measure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/174721_pastedImage_8.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;As soon as I add another dimension (Major) and stack it I get unexpected results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/174725_pastedImage_10.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;I'm using the same measure and sort formula.&amp;nbsp; I would have thought that "Test 2" would be excluded since there is none with a Term of "Side Effect".&amp;nbsp; The sort is also off as it's counting the distinct Document ID by Major AND Keyword now and appending them together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm guessing this is a misunderstanding of set analysis on my part.&amp;nbsp; Any advice or direction appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source data and QVF attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 17:44:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387391#M31825</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-25T17:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387392#M31826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count( TOTAL {$&amp;lt;Term={"Side Effect"}&amp;gt;} DISTINCT Document_ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 17:56:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387392#M31826</guid>
      <dc:creator>dan_sullivan</dc:creator>
      <dc:date>2017-08-25T17:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387393#M31827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan - unfortunately that just seems to ignore the dimensions and retrieve total data (included data other than "side effects").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/174726_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 18:15:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387393#M31827</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-25T18:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387394#M31828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erik,&lt;/P&gt;&lt;P&gt;uncheck this&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/174727_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Antonio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 18:19:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387394#M31828</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-08-25T18:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387395#M31829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And use &lt;A href="https://community.qlik.com/qlik-users/234717"&gt;dan.sullivan&lt;/A&gt; expression (with TOTAL) only in sort Keyword (sort by expression)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 18:30:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387395#M31829</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-08-25T18:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387396#M31830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Antonio!&amp;nbsp; That takes care of the unnecessary dimension value. Appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/174728_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the sorting is still off.&amp;nbsp; I am using the same formula to sort as the measure. But it's not sorting descending as expected.&amp;nbsp; According to the help, "sort by expression" seems to be the way I want to go here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;In bar charts with multiple dimensions, sorting is locked to the first dimension. This dimension is what groups and stacks are based on, and sorting on a different dimension or a measure would break up these groups in an undesirable way. If you still want to sort by the measure value, try using the option &lt;SPAN class="ui_item"&gt;Sort by expression&lt;/SPAN&gt; on the first dimension under &lt;SPAN class="ui_item"&gt;Sorting&lt;/SPAN&gt;.&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({$&amp;lt;Term={"Side Effect"}&amp;gt;} DISTINCT Document_ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as my expression for "sort by expression".&amp;nbsp; This works if I have a non-stacked bar chart with keyword.&amp;nbsp; But as soon as "Major" is introduced the counts change but the sorting doesn't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts on that piece?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Save&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 18:33:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387396#M31830</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-25T18:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387397#M31831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;now can you use my sort expression formula from above?&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count(TOTAL {$&amp;lt;Term={"Side Effect"}&amp;gt;} DISTINCT Document_ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 18:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387397#M31831</guid>
      <dc:creator>dan_sullivan</dc:creator>
      <dc:date>2017-08-25T18:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387398#M31832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See Attachment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 18:47:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387398#M31832</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-08-25T18:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387399#M31833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan - thanks.&amp;nbsp; In this limited set of test data, that seems to sort it correctly (though changing it to ascending or descending does nothing - which makes me think it's not quite working as expected).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I flip over to my large data set with real data in the same structure, that formula unfortunately does not sort correctly.&amp;nbsp; I'm reading up a bit on TOTAL now....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 18:48:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387399#M31833</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-25T18:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387400#M31834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much Antonio - while it seems to work in this example (though I don't think it does as if you change the sort order between Ascending and Descending nothing happens) this doesn't sort my larger data set correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm pretty stumped on this one.&amp;nbsp; Appreciate your help so far.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 18:52:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387400#M31834</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-25T18:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387401#M31835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The use of TOTAL for sorting I'm thinking sorts everything by 7 - hence why things aren't changed when Descending or Ascending is toggled.&amp;nbsp; In that case it must sort alphabetically?&lt;SPAN&gt;&lt;IMG __jive_id="174730" alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/174730_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Save&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Save&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 18:57:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387401#M31835</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-25T18:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387402#M31836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did some testing and it actually appears to be sorting by load order when using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({$&amp;lt;Term={"Side Effect"}&amp;gt;} TOTAL&amp;nbsp; DISTINCT Document_ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as the formula for "sort by expression".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I did was reorder the source data in Excel to put the "Test 3" keywords first.&amp;nbsp; QVF and source attached.&amp;nbsp; Unfortunately using TOTAL doesn't seem to work here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other thoughts?&amp;nbsp; I did successfully create a sort formula that sort of works when you use it in sort by expression on keyword:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({$&amp;lt;Term={"Side Effect"}, Major={"Major"}&amp;gt;} DISTINCT Document_ID) + Count({$&amp;lt;Term={"Side Effect"}, Major={"Minor"}&amp;gt;} DISTINCT Document_ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That correctly adds the minor/major term counts together for sorting.&amp;nbsp; As long as I don't filter on Major.&amp;nbsp; Then it falls apart (and the users will want to filter on Major).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 19:19:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387402#M31836</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-25T19:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387403#M31837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If You want Ascending or Descending, then use this in formula of 'sort by expression'&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;Term={"Side Effect"}&amp;gt;}&amp;nbsp; DISTINCT Document_ID)&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/174732_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/174733_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 19:24:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387403#M31837</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-08-25T19:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387404#M31838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Antonio - I wish that was it!&amp;nbsp; But in your examples notice that they are not "ascending" and "descending".&amp;nbsp; In you first screenshot, if the order is "ascending" (I think that is "crescente" right?) then Test 3 with a value of 4 would be first followed by Test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate you guys hanging with me.&amp;nbsp; This seems like it should be so deceptively simple....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 19:32:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387404#M31838</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-25T19:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387405#M31839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is referred to Blu Bar Value only and not Blu+Red&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 19:46:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387405#M31839</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-08-25T19:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a Stacked Bar with Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387406#M31840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I think I solved my question by sorting on expression by:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(aggr(Count({$&amp;lt;Term={'Side Effect'}&amp;gt;} DISTINCT Document_ID),Major,Keyword))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to find holes in this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 20:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-a-Stacked-Bar-with-Set-Analysis/m-p/1387406#M31840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-25T20:08:08Z</dc:date>
    </item>
  </channel>
</rss>

