<?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: Sorting TOTAL by group and variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693585#M250868</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tresesco,&lt;/P&gt;&lt;P&gt;no luck it gives a too low percentage. It seems to divide by all the answers of the study in question, when for example selecting Gender, I would like it to divide separately by all the females and all the males.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this formula works correctly in the situation when you have Gender selected and it works only for the females but I would like to use the cyclic group to be able to use the same formula for several different dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;({$&amp;lt;AD_CampaignID={'$(=vStudy)'}, AD_NoticeScore1={'1'}&amp;gt;}Weight)/Sum(TOTAL {$&amp;lt;AD_CampaignID={'$(=vStudy)'}, Gender={'F'}&amp;gt;} Weight)&lt;/P&gt;&lt;P&gt;So instead of the Gender={'F'} have the functionality that the [$(=GetCurrentField(SelectNoticeScoreGroup1))] allows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Aug 2014 06:16:34 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-08-19T06:16:34Z</dc:date>
    <item>
      <title>Sorting TOTAL by group and variable</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693576#M250859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having a small problem with finding the correct syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this expression that works nicely&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;AD_NoticeScore1={'1'}&amp;gt;}Weight)/Sum(TOTAL &amp;lt;[$(=GetCurrentField(SelectNoticeScoreGroup1))]&amp;gt; Weight)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I would need to add the functionality to sort the result by the variable study.&lt;/P&gt;&lt;P&gt;AD_CampaignID={'$(=vStudy)'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it should look something like&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;AD_CampaignID={'$(=vStudy)'}, AD_NoticeScore1={'1'}&amp;gt;}Weight)/Sum(TOTAL &amp;lt;AD_CampaignID={'$(=vStudy)'},[$(=GetCurrentField(SelectNoticeScoreGroup1))]&amp;gt; Weight)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first sum part works nicely but the TOTAL syntax doesn't. Help would be greatly appreciated, thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jokke Kaksonen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 06:25:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693576#M250859</guid>
      <dc:creator />
      <dc:date>2014-08-18T06:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting TOTAL by group and variable</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693577#M250860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({$&amp;lt;AD_CampaignID={'$(=vStudy)'}, AD_NoticeScore1={'1'}&amp;gt;}Weight)/Sum(&amp;lt;AD_CampaignID={'$(=vStudy)'},[$(=GetCurrentField(SelectNoticeScoreGroup1))]&amp;gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;TOTAL &lt;/SPAN&gt; Weight)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 07:35:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693577#M250860</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2014-08-18T07:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting TOTAL by group and variable</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693578#M250861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AD_CampaignID={'$(vStudy)'&amp;nbsp; // without an '=' should work alone. Could you post a sample qvw and explain the expected output against that? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 07:43:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693578#M250861</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-08-18T07:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting TOTAL by group and variable</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693579#M250862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I posted a sample qvw, which should show up, once it get's through moderation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main idea with the vStudy variable is that I want to use it instead of selection from the AD_CampaignID field so that it's value doesn't show up in the selected fields and it doesn't get cleared when a user clears all the selections.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 08:50:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693579#M250862</guid>
      <dc:creator />
      <dc:date>2014-08-18T08:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting TOTAL by group and variable</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693580#M250863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the sample&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.kaksonen.org/test2.qvw"&gt;http://www.kaksonen.org/test2.qvw&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 10:28:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693580#M250863</guid>
      <dc:creator />
      <dc:date>2014-08-18T10:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Sorting TOTAL by group and variable</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693581#M250864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you test this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 20:00:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693581#M250864</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2014-08-18T20:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Sorting TOTAL by group and variable</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693582#M250865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't seem to work any better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setting the vStudy variable as 1001 should give to the graph the same result as selecting 1001 from the AD_CampaignID field. The only difference would be that with the variable the 1001 the user cannot clear it from the selections by pressing a button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the 1001 selected by the variable&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Snip1.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/64704_Snip1.JPG.jpg" style="width: 620px; height: 253px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And heres the same selected from the AD_Campaign field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Snip2.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/64705_Snip2.JPG.jpg" style="width: 620px; height: 227px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 04:55:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693582#M250865</guid>
      <dc:creator />
      <dc:date>2014-08-19T04:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Sorting TOTAL by group and variable</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693583#M250866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The expression that I'm trying to achieve should look without the formulas something in the style&lt;/P&gt;&lt;P&gt;Sum(&amp;lt;AD_CampaignID=1001, AD_NoticeScore1=1&amp;gt;Weight)/Sum(TOTAL &amp;lt;AD_CampaignID=1001, Gender&amp;gt; Weight).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it even ok, to have both a 'Field =' and a dimension (Gender) specified in the same selection ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jokke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 05:30:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693583#M250866</guid>
      <dc:creator />
      <dc:date>2014-08-19T05:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting TOTAL by group and variable</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693584#M250867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;AD_CampaignID={'$(vStudy)'}, AD_NoticeScore2={'1'}&amp;gt;}Weight)/Sum(TOTAL {&amp;lt;AD_CampaignID={'$(vStudy)'}&amp;gt;} Weight)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: getcurrentfield() would not be required because TOTAL key would by default act upon current field .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 05:55:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693584#M250867</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-08-19T05:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Sorting TOTAL by group and variable</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693585#M250868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tresesco,&lt;/P&gt;&lt;P&gt;no luck it gives a too low percentage. It seems to divide by all the answers of the study in question, when for example selecting Gender, I would like it to divide separately by all the females and all the males.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this formula works correctly in the situation when you have Gender selected and it works only for the females but I would like to use the cyclic group to be able to use the same formula for several different dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;({$&amp;lt;AD_CampaignID={'$(=vStudy)'}, AD_NoticeScore1={'1'}&amp;gt;}Weight)/Sum(TOTAL {$&amp;lt;AD_CampaignID={'$(=vStudy)'}, Gender={'F'}&amp;gt;} Weight)&lt;/P&gt;&lt;P&gt;So instead of the Gender={'F'} have the functionality that the [$(=GetCurrentField(SelectNoticeScoreGroup1))] allows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 06:16:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693585#M250868</guid>
      <dc:creator />
      <dc:date>2014-08-19T06:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting TOTAL by group and variable</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693586#M250869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Jokke Kaksonen wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;no luck it gives a too low percentage...&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is beacuse, your divisor is not being filtered by the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;AD_NoticeScore1={'1'} &lt;/STRONG&gt;which is the case with dividend. If you use the same filter in both parts you would get F+M=100. Try:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({$&amp;lt;AD_CampaignID={'$(vStudy)'}, AD_NoticeScore2={'1'}&amp;gt;}Weight)/Sum(TOTAL {&amp;lt;AD_CampaignID={'$(vStudy)'},&lt;STRONG&gt;AD_NoticeScore2={'1'}&lt;/STRONG&gt;&amp;gt;} Weight) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure, If I really got your issue right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 06:24:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693586#M250869</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-08-19T06:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting TOTAL by group and variable</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693587#M250870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally figured out the correct formula. It is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;AD_CampaignID={'$(=vStudy)'},AD_NoticeScore1={'1'}&amp;gt;}Weight)/Sum(TOTAL &amp;lt;[$(=GetCurrentField(SelectNoticeScoreGroup1))]&amp;gt; {$&amp;lt;AD_CampaignID={'$(=vStudy)'}&amp;gt;}Weight)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you all for your effort and time &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Jokke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 08:11:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-TOTAL-by-group-and-variable/m-p/693587#M250870</guid>
      <dc:creator />
      <dc:date>2014-08-19T08:11:17Z</dc:date>
    </item>
  </channel>
</rss>

