<?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 Dynamic Price Ranges in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamic-Price-Ranges/m-p/331950#M493357</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’ve been having trouble&amp;nbsp; related to a development in which we're looking to classify and sum the amount of kilograms of a product that were sold between certain price ranges (dynamic price ranges).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Detailed explanation:&lt;/P&gt;&lt;P&gt;There are different dimensions we'll be using to group the information, however for this example we could focuse on two: Group and Sub_Group. As you migh imagine each product is associated both to a Group and a Sub_Group.&lt;/P&gt;&lt;P&gt;Each product can be sold at different price in every transaction and any amount of kilograms might be sold,therefore each Group and Sub_Group of products can have different price ranges.&lt;/P&gt;&lt;P&gt;The total price range for a Group or Sub_Group is calculated as follows:&amp;nbsp; Max(Price) – Min(Price). Now that "spread" or delta is the total price range, we need to generate 10 equaly sized price ranges or groups to clasify the ammount to kilograms being sold in each Price Group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For example: For a specific Sub_Group the Min(Price) is 10 and Mac(Price) is 20. Then the total delta for this specific Sub_group is 10. So the 10 different Price Groups should be generated as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 2&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 3&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 4&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 5&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 6&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 7&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 8&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 9&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 10&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;10 to 11&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;11 to 12&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;12 to 13&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;13 to 14&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;14 to 15&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;15 to 16&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;16 to 17&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;17 to 18&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;18 to 19&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;19 to 20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to solve it using expressions like this one for each range of prices:&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Price&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;={'&amp;gt;=$(=(((max(Price)-min(Price))/10)*1)+min(Price))&amp;lt;$(=(((max(Price)-min(Price))/10)*2)+min(Price))'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Kilograms&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;The problem with this expression is that it doesn’t respect the maximumand minimum prices of each group or sub_group, it takes the maximum and minimum of all the universe of prices in the selections.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;I’ve tried to seek of a solution in the script but it doesn’t work as desired because it took away the dynamism (the user must be able to select different time periods) of the solution. So I believe that this has to be solved in the expressions itself.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Hope someone has an idea that might help to solving this. I appreciate your time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Im also attaching an example .qvw that might clarify what I'm trying to do.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Best regards.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 May 2012 18:35:45 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-31T18:35:45Z</dc:date>
    <item>
      <title>Dynamic Price Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Price-Ranges/m-p/331950#M493357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’ve been having trouble&amp;nbsp; related to a development in which we're looking to classify and sum the amount of kilograms of a product that were sold between certain price ranges (dynamic price ranges).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Detailed explanation:&lt;/P&gt;&lt;P&gt;There are different dimensions we'll be using to group the information, however for this example we could focuse on two: Group and Sub_Group. As you migh imagine each product is associated both to a Group and a Sub_Group.&lt;/P&gt;&lt;P&gt;Each product can be sold at different price in every transaction and any amount of kilograms might be sold,therefore each Group and Sub_Group of products can have different price ranges.&lt;/P&gt;&lt;P&gt;The total price range for a Group or Sub_Group is calculated as follows:&amp;nbsp; Max(Price) – Min(Price). Now that "spread" or delta is the total price range, we need to generate 10 equaly sized price ranges or groups to clasify the ammount to kilograms being sold in each Price Group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For example: For a specific Sub_Group the Min(Price) is 10 and Mac(Price) is 20. Then the total delta for this specific Sub_group is 10. So the 10 different Price Groups should be generated as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 2&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 3&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 4&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 5&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 6&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 7&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 8&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 9&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;P_Group 10&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;10 to 11&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;11 to 12&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;12 to 13&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;13 to 14&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;14 to 15&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;15 to 16&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;16 to 17&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;17 to 18&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;18 to 19&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;19 to 20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sum of Kg. sold &lt;/P&gt;&lt;P&gt;in this price range&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to solve it using expressions like this one for each range of prices:&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Price&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;={'&amp;gt;=$(=(((max(Price)-min(Price))/10)*1)+min(Price))&amp;lt;$(=(((max(Price)-min(Price))/10)*2)+min(Price))'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Kilograms&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;The problem with this expression is that it doesn’t respect the maximumand minimum prices of each group or sub_group, it takes the maximum and minimum of all the universe of prices in the selections.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;I’ve tried to seek of a solution in the script but it doesn’t work as desired because it took away the dynamism (the user must be able to select different time periods) of the solution. So I believe that this has to be solved in the expressions itself.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Hope someone has an idea that might help to solving this. I appreciate your time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Im also attaching an example .qvw that might clarify what I'm trying to do.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Best regards.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 18:35:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Price-Ranges/m-p/331950#M493357</guid>
      <dc:creator />
      <dc:date>2012-05-31T18:35:45Z</dc:date>
    </item>
  </channel>
</rss>

