<?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: Calculated Dimension based on measure in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891987#M310629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply. Can you please explain what the significance of $(Cluster) and 'x',o in the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And do I need to declare any variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Apr 2015 10:14:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-23T10:14:40Z</dc:date>
    <item>
      <title>Calculated Dimension based on measure</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891985#M310627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table which have fields like retailer name, sales ,year and month and dates. Now the requirement is to have a dimension which categorizes retailers into five segments based on their averages sales over the selected period. The average sales can be between say 0-10k, 10k-20k,20k-30k....etc. Based on the selected month and year in filters I want to have the count of retailer , their total sales in that period and the Average sales. Average Sales is the total transacted value by the no. of times or orders in which that transaction has been achieved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 09:35:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891985#M310627</guid>
      <dc:creator />
      <dc:date>2015-04-23T09:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension based on measure</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891986#M310628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use class() and aggr() to create such calculated dimension, maybe in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Class(aggr(avg(Sales), Retailer), $(Cluster), 'x', 0) // maybe cluster-size as variable $(Cluster)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the expressions could be simply sum/avg(Sales) or count(Retailer).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 10:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891986#M310628</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-04-23T10:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension based on measure</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891987#M310629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply. Can you please explain what the significance of $(Cluster) and 'x',o in the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And do I need to declare any variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 10:14:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891987#M310629</guid>
      <dc:creator />
      <dc:date>2015-04-23T10:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension based on measure</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891988#M310630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need the variable. You could just use a fix value like 10000 but I like to be more flexible by this kind of clustering and use often a variable (most controlled by a inputbox in dropdown-mode with a predefined valuelist). The 'x' is an optional setting for the displayed symbol within the cluster. You could also use a num() or replace() around the expression to adjust the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 10:24:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891988#M310630</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-04-23T10:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension based on measure</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891989#M310631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually my requirement is not a fix interval but its like 0-40000, 40000-60000, and like that I wrote a calculated dimension as &lt;/P&gt;&lt;P&gt;=If(aggr(sum(value),ret_id)&amp;gt;=0 and aggr(sum(value),ret_id)&amp;lt;=40000,'a.&amp;nbsp; 0K~40K',&lt;/P&gt;&lt;P&gt;if(aggr(sum(value),ret_id)&amp;gt;40000 and aggr(sum(value),ret_id)&amp;lt;=60000,'b.&amp;nbsp; 40K~60K',&lt;/P&gt;&lt;P&gt;if(aggr(sum(value),ret_id)&amp;gt;60000 and aggr(sum(value),ret_id)&amp;lt;=80000,'c.&amp;nbsp; 60K~80K',&lt;/P&gt;&lt;P&gt;if(aggr(sum(value),ret_id)&amp;gt;80000 and aggr(sum(value),ret_id)&amp;lt;=100000,'d.&amp;nbsp; 80K~100K',&lt;/P&gt;&lt;P&gt;if(aggr(sum(value),ret_id)&amp;gt;100000 and aggr(sum(value),ret_id)&amp;lt;=500000,'e.&amp;nbsp; 100K~500K',&lt;/P&gt;&lt;P&gt;if(aggr(sum(value),ret_id)&amp;gt;500000 and aggr(sum(value),ret_id)&amp;lt;=1000000,'f.&amp;nbsp; 500K~1000K',&lt;/P&gt;&lt;P&gt;'g.&amp;nbsp; ~&amp;gt;1000K'))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I also need to display these ranges in my table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any issue with this expression it is not giving the correct result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 10:29:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891989#M310631</guid>
      <dc:creator />
      <dc:date>2015-04-23T10:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension based on measure</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891990#M310632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the calculated dimensions failed because the if-loop isn't wrapped from the aggr. The means the check should be inside the aggr-function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I wouldn't use such nested if-loop with two aggr-calculations each then this will be already extremly slow by middle-sized datasets and not (really) run with large amounts of data. I prefer to build a lookup for the expression-result, see here for examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/751818"&gt;Re: Aggr(sum in calculated dimension&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/593232"&gt;Re: Substitute to nested ifs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 10:53:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891990#M310632</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-04-23T10:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension based on measure</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891991#M310633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcus.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 10:59:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-based-on-measure/m-p/891991#M310633</guid>
      <dc:creator />
      <dc:date>2015-04-23T10:59:33Z</dc:date>
    </item>
  </channel>
</rss>

