<?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 I get this total using set analysis? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-I-get-this-total-using-set-analysis/m-p/661530#M1078310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a total orders text object that is set as &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =num(count(ORDER_NO), '#,##0')&lt;/P&gt;&lt;P&gt;So that is just telling me the number of orders total that I am pulling from the database. In addition to the total orders I have three subtotals of the orders 2 of which I have gotten easily. Those two are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System Generated : =num(count({&amp;lt;ROLEUSER={'PSSCHED'}&amp;gt;} ORDER_NO), '#,##0')&lt;/P&gt;&lt;P&gt;Internal Orders: =num(count({&amp;lt;ROLENAME={'ASB_INTERNAL_USERS'}, ROLEUSER-={'PSSCHED'}&amp;gt;} ORDER_NO), '#,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RoleUser is a listbox that contains a little over 719 different names of users, these users are the ones who have entered the orders&lt;/P&gt;&lt;P&gt;RoleName is a listbox that contains one object and that is ASB_INTERNAL_USERS, 440 users have the rolename 'ASB_INTERNAL_USERS' the remaining have no role name. The remaining users are the users that have entered the orders for the 3rd subtotal I am looking for. And that is where I am struggling to get the right expression for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried writing =num(count({&amp;lt;ROLENAME-={'ASB_INTERNAL_USERS'}&amp;gt;} ORDER_NO), '#,##0') &lt;/P&gt;&lt;P&gt;but it always gives me a zero, when I know the total is 183,025&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can get the total orders to display this by selecting the rolename then in the user listbox right clicking and selecting excluded which then grays out the role name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possible way to get this 183025 is by adding the two subtotals and subtracting the sum from the total, but every time I try to sum a count() my expression does not work .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I didn't make this to unclear, if anything could use some more explaining, I will do my best to clear it up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Jul 2014 14:20:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-07-11T14:20:51Z</dc:date>
    <item>
      <title>How do I get this total using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-get-this-total-using-set-analysis/m-p/661530#M1078310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a total orders text object that is set as &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =num(count(ORDER_NO), '#,##0')&lt;/P&gt;&lt;P&gt;So that is just telling me the number of orders total that I am pulling from the database. In addition to the total orders I have three subtotals of the orders 2 of which I have gotten easily. Those two are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System Generated : =num(count({&amp;lt;ROLEUSER={'PSSCHED'}&amp;gt;} ORDER_NO), '#,##0')&lt;/P&gt;&lt;P&gt;Internal Orders: =num(count({&amp;lt;ROLENAME={'ASB_INTERNAL_USERS'}, ROLEUSER-={'PSSCHED'}&amp;gt;} ORDER_NO), '#,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RoleUser is a listbox that contains a little over 719 different names of users, these users are the ones who have entered the orders&lt;/P&gt;&lt;P&gt;RoleName is a listbox that contains one object and that is ASB_INTERNAL_USERS, 440 users have the rolename 'ASB_INTERNAL_USERS' the remaining have no role name. The remaining users are the users that have entered the orders for the 3rd subtotal I am looking for. And that is where I am struggling to get the right expression for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried writing =num(count({&amp;lt;ROLENAME-={'ASB_INTERNAL_USERS'}&amp;gt;} ORDER_NO), '#,##0') &lt;/P&gt;&lt;P&gt;but it always gives me a zero, when I know the total is 183,025&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can get the total orders to display this by selecting the rolename then in the user listbox right clicking and selecting excluded which then grays out the role name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possible way to get this 183025 is by adding the two subtotals and subtracting the sum from the total, but every time I try to sum a count() my expression does not work .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I didn't make this to unclear, if anything could use some more explaining, I will do my best to clear it up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 14:20:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-get-this-total-using-set-analysis/m-p/661530#M1078310</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-11T14:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get this total using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-get-this-total-using-set-analysis/m-p/661531#M1078311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt;Create below in your script..&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt;IF(ROLENAME = 'ASB_INTERNAL_USERS', ROLENAME, ‘NONAME’) as ROLENAME&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt;Now use&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt;=num(count({&amp;lt;ROLENAME={'NONAME'}, ROLEUSER-={'PSSCHED'}&amp;gt;} ORDER_NO), '#,##0')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt;=num(count({&amp;lt;ROLENAME={'NONAME'}&amp;gt;} ORDER_NO), '#,##0')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt;Whatever is required…&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 14:24:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-get-this-total-using-set-analysis/m-p/661531#M1078311</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-07-11T14:24:54Z</dc:date>
    </item>
  </channel>
</rss>

