<?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 Customer Rewards by Range Sales in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Customer-Rewards-by-Range-Sales/m-p/148335#M26655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a little something that may work. I put in the data you mentioned. I wasn't sure what Reward Amount was. I added it in as a percentage of sales.&lt;/P&gt;&lt;P&gt;I then created a table with Customer as the Dimension. Sum(Sales) as an expression and another expression to calculate Reward.&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=Sum(If(Date &amp;gt;= Start AND Date &amp;lt;= End, Sales * Reward, 0))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Then wherever the Sales Date falls in the reward ranges, that Reward amount will be used. The If is not the prettiest thing in the world, but it seems to work (if I'm understanding you correctly).&lt;/P&gt;&lt;P&gt;I've attached a sample (QlikView 9).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jul 2009 21:07:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-02T21:07:25Z</dc:date>
    <item>
      <title>Customer Rewards by Range Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Rewards-by-Range-Sales/m-p/148334#M26654</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;I need to assign to my customers a reward based on the range of their sales.&lt;/P&gt;&lt;P&gt;[Sales table]: sales date, customer, sales amount&lt;/P&gt;&lt;P&gt;[Reward table]: sales from, sales to, reward amount&lt;/P&gt;&lt;P&gt;I'd need to obtain a table containing:&lt;/P&gt;&lt;P&gt;customer - current year sales amount - reward amount&lt;/P&gt;&lt;P&gt;I mean it should be done at running time, not when loading data !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 19:48:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Rewards-by-Range-Sales/m-p/148334#M26654</guid>
      <dc:creator>lucarizziero</dc:creator>
      <dc:date>2009-07-02T19:48:50Z</dc:date>
    </item>
    <item>
      <title>Customer Rewards by Range Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Rewards-by-Range-Sales/m-p/148335#M26655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a little something that may work. I put in the data you mentioned. I wasn't sure what Reward Amount was. I added it in as a percentage of sales.&lt;/P&gt;&lt;P&gt;I then created a table with Customer as the Dimension. Sum(Sales) as an expression and another expression to calculate Reward.&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=Sum(If(Date &amp;gt;= Start AND Date &amp;lt;= End, Sales * Reward, 0))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Then wherever the Sales Date falls in the reward ranges, that Reward amount will be used. The If is not the prettiest thing in the world, but it seems to work (if I'm understanding you correctly).&lt;/P&gt;&lt;P&gt;I've attached a sample (QlikView 9).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 21:07:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Rewards-by-Range-Sales/m-p/148335#M26655</guid>
      <dc:creator />
      <dc:date>2009-07-02T21:07:25Z</dc:date>
    </item>
    <item>
      <title>Customer Rewards by Range Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Rewards-by-Range-Sales/m-p/148336#M26656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I try to explain better.&lt;/P&gt;&lt;P&gt;The [sales from] and [sales to] represent the interval to which sum(sales amount) must agree for obtaining the reward.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;for all customer to which I have a [sales amount] more than 10,000€ and less than 20,000€ I assign a reward of 500€&lt;/P&gt;&lt;P&gt;for all customer to which I have a [sales amount] more than 20,000€ and less than 30,000€ I assign a reward of 1,000€&lt;/P&gt;&lt;P&gt;for all customer to which I have a [sales amount] more than 30,000€ I assign a reward of 1,500€&lt;/P&gt;&lt;P&gt;and so on&lt;/P&gt;&lt;P&gt;The final table should be something like:&lt;/P&gt;&lt;P&gt;Customer A - [Sales amount] 500€ - [reward] 0€&lt;/P&gt;&lt;P&gt;Customer B - [Sales amount] 16,000€ - [reward] 500€&lt;/P&gt;&lt;P&gt;Customer A - [Sales amount] 50,000€ - [reward] 1,500€&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 21:24:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Rewards-by-Range-Sales/m-p/148336#M26656</guid>
      <dc:creator>lucarizziero</dc:creator>
      <dc:date>2009-07-02T21:24:07Z</dc:date>
    </item>
    <item>
      <title>Customer Rewards by Range Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Rewards-by-Range-Sales/m-p/148337#M26657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, that seems a bit more difficult.&lt;/P&gt;&lt;P&gt;I came up with something, but I'm not too thrilled with it. First, I needed to create the range for Zero Reward. Then I used Customer and Reward as dimensions. For the expression, I pulled Sum(Sales) if it was within the threshold. Otherwise, it resulted in zero. Since zero values are suppresses, those records won't show up. In the end, it looks like what you describe. Unfortunately, since the Reward is a dimension, it is on the left of Sum(Sales).&lt;/P&gt;&lt;P&gt;Hopefully, someone can come up with a better solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 22:05:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Rewards-by-Range-Sales/m-p/148337#M26657</guid>
      <dc:creator />
      <dc:date>2009-07-02T22:05:08Z</dc:date>
    </item>
    <item>
      <title>Customer Rewards by Range Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Rewards-by-Range-Sales/m-p/148338#M26658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's another approach:&lt;/P&gt;&lt;P&gt;max(aggr(if(sum({&amp;lt;YTD={1}&amp;gt;}Sales)&amp;gt;=Min,Reward),Customer,Min))&lt;/P&gt;&lt;P&gt;The simplified range check doesn't required your reward table to have a 0 min or an "infinite" max. It just requires that the rewards be ascending, as any good reward structure is likely to be. And as desired, the reward is an expression rather than a dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2009 02:27:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Rewards-by-Range-Sales/m-p/148338#M26658</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-07-03T02:27:39Z</dc:date>
    </item>
  </channel>
</rss>

