<?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 AW:Expression Syntax in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157348#M501388</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Purely from the syntax perspective, - you are using single quotes, while you need double quotes to signify "search".&lt;/P&gt;&lt;P&gt;However, I think there is a deeper problem in trying to select ims_org_id and at the same time, to try and count the same field in your condition. I suspect that your count always returns 1 because it should be evaluated separately for each ims_org_id.&lt;/P&gt;&lt;P&gt;If you could explain the logic of your condition - what are you trying to accomplish, perhaps someone could offer a better solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Mar 2011 18:18:40 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2011-03-11T18:18:40Z</dc:date>
    <item>
      <title>Expression Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157345#M501385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have two functioning equations:&lt;/P&gt;&lt;P&gt;# of Businesses =floor(pct*count(DISTINCT ims_org_id))&lt;/P&gt;&lt;P&gt;Cumulative Sales =sum( {$&amp;lt;ims_org_id={'=rank(sum(acct_brndddd_2010)) = 10'}&amp;gt;} acct_brndddd_2010)&lt;/P&gt;&lt;P&gt;I need to replace the "10" in the Cumulative Sales expression with the # of Businesses expression.&lt;/P&gt;&lt;P&gt;I have tried replacing the "10" with labels and other expression syntax, but I have not found the correct combination.&lt;/P&gt;&lt;P&gt;Thanks for your help in advance!&lt;/P&gt;&lt;P&gt;Brent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 16:58:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157345#M501385</guid>
      <dc:creator />
      <dc:date>2011-03-11T16:58:54Z</dc:date>
    </item>
    <item>
      <title>AW:Expression Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157346#M501386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;create a new variable with your # of Businesses:&lt;/P&gt;&lt;P&gt;varNoBusiness: =Floor(pct*Count(DISTINCT ims_org_id))&lt;/P&gt;&lt;P&gt;and change in your expression the 10 into $(varNoBusiness)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 17:18:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157346#M501386</guid>
      <dc:creator>brenner_martina</dc:creator>
      <dc:date>2011-03-11T17:18:27Z</dc:date>
    </item>
    <item>
      <title>AW:Expression Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157347#M501387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried this, but the expression only produces zero as a result...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;ims_org_id={'=rank(sum(acct_brndddd_2010)) = $(testvar)'}&amp;gt;} acct_brndddd_2010)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 17:49:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157347#M501387</guid>
      <dc:creator />
      <dc:date>2011-03-11T17:49:56Z</dc:date>
    </item>
    <item>
      <title>AW:Expression Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157348#M501388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Purely from the syntax perspective, - you are using single quotes, while you need double quotes to signify "search".&lt;/P&gt;&lt;P&gt;However, I think there is a deeper problem in trying to select ims_org_id and at the same time, to try and count the same field in your condition. I suspect that your count always returns 1 because it should be evaluated separately for each ims_org_id.&lt;/P&gt;&lt;P&gt;If you could explain the logic of your condition - what are you trying to accomplish, perhaps someone could offer a better solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 18:18:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157348#M501388</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-03-11T18:18:40Z</dc:date>
    </item>
    <item>
      <title>AW:Expression Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157349#M501389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The count of the ims_org_id seems to be working okay.&lt;/P&gt;&lt;P&gt;Ultimately I am trying to produce a chart that compares the % of Customers to the % of Sales...so I could see if 20% of my customers were driving 80% of my business. The chart I want to create would have one dimension (Percent - predefined points where we want to see the % of Sales...my requirement is 1%,5%,20%,50%...these values are loaded within an inline view) and % of Sales (which requires the Cumulative Sales expression as the numerator).&lt;/P&gt;&lt;P&gt;The Cumalative Sales expression is trying to determine the Sales for the top n% of customers. For example:&lt;/P&gt;&lt;P&gt;# of customers = 1000 and total sales =2,000,000&lt;/P&gt;&lt;P&gt;20% of my customers =200&lt;/P&gt;&lt;P&gt;Rank the customers by Sales descending and sum the Sales values for the first 200 customers (lets say that equals 1,000,000)&lt;/P&gt;&lt;P&gt;So % of Sales would equal 1,000,000 / 2,000,000 = 50%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 18:58:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157349#M501389</guid>
      <dc:creator />
      <dc:date>2011-03-11T18:58:56Z</dc:date>
    </item>
    <item>
      <title>AW:Expression Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157350#M501390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd recommend creating a calculated dimension based on advanced aggregation function aggr - something like this:&lt;/P&gt;&lt;P&gt;AGGR(sum(Sales)/sum(TOTAL Sales) , CustomerID)&lt;/P&gt;&lt;P&gt;You'd need to add logic to distribute those numbers into your desired buckets, if you can't settle on equally distributed 10%, 20%, 30% etc...&lt;/P&gt;&lt;P&gt;Then your expression could simply be this:&lt;/P&gt;&lt;P&gt;count(distinct CustomerID) / count(total distinct CustomerID)&lt;/P&gt;&lt;P&gt;Use "Full Aggregation" to get cumulative totals.&lt;/P&gt;&lt;P&gt;You don't really need Set Analysis for this type of chart...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 19:16:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157350#M501390</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-03-11T19:16:48Z</dc:date>
    </item>
    <item>
      <title>AW:Expression Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157351#M501391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure I follow your response...&lt;/P&gt;&lt;P&gt;Where does the rank come into the formulas you showed?&lt;/P&gt;&lt;P&gt;What do you mean by "add logic to distribute those numbers into your desired buckets"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 19:51:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Syntax/m-p/157351#M501391</guid>
      <dc:creator />
      <dc:date>2011-03-11T19:51:27Z</dc:date>
    </item>
  </channel>
</rss>

