<?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 to combine values in a pie chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-combine-values-in-a-pie-chart/m-p/1557078#M744642</link>
    <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I am trying to create a pie chart that will group companies by number of subscriptions, and combine them where the total value is &amp;lt; 9000.&lt;/P&gt;&lt;P&gt;For example, the key would be:&lt;/P&gt;&lt;P&gt;Number of Subscriptions:&lt;/P&gt;&lt;P&gt;8&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;4&amp;nbsp;or less subscriptions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Say 200 companies have 4 or less subscriptions, the total value of their combined subscriptions should be grouped together as one value on the pie chart and shown as one colour. The rest (5 to &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; should have their values in total too, so the total value of all companies with 5 subscriptions (as say blue in the pie chart), the total value of all companies with 6 as red etc, but represented as different sections of the pie...&lt;/P&gt;&lt;P&gt;I am finding it difficult to figure out what my dimensions should be and expressions. This is the inline test data:&lt;/P&gt;&lt;P&gt;Customers:&lt;BR /&gt;LOAD * INLINE [ Customer_ID, Customer_Name&lt;BR /&gt;1, Indeedly Ltd&lt;BR /&gt;2, Hopably Plc&lt;BR /&gt;3, Hticly Ltd&lt;BR /&gt;4, Voticly Partnerships&lt;BR /&gt;5, Woulse&lt;BR /&gt;6, Certable&lt;BR /&gt;7, Vertab&lt;BR /&gt;8, Exreed&lt;BR /&gt;9, Sensly&lt;BR /&gt;10, Perfectly Grown Planting Co&lt;BR /&gt;11, Well.ly&lt;BR /&gt;12, Perescope&lt;BR /&gt;13, Howvent&lt;BR /&gt;14, Cachimp&lt;BR /&gt;15, HWHeres&lt;BR /&gt;16, Creaat&lt;BR /&gt;17, Hably&lt;BR /&gt;18, Justable&lt;BR /&gt;19, Acurew ];&lt;/P&gt;&lt;P&gt;Products:&lt;BR /&gt;LOAD * INLINE [ Product_ID, Product_Name&lt;BR /&gt;1, Afghanistan&lt;BR /&gt;2, Bahrain&lt;BR /&gt;3, Cambodia&lt;BR /&gt;4, Democratic Republic of the Congo&lt;BR /&gt;5, El Salvador&lt;BR /&gt;6, Gambia&lt;BR /&gt;7, Honduras&lt;BR /&gt;8, Indonesia&lt;BR /&gt;9, Japan&lt;BR /&gt;11, Kazakhstan&lt;BR /&gt;12, Laos&lt;BR /&gt;13, Madagascar&lt;BR /&gt;14, Nauru&lt;BR /&gt;15, Oman&lt;BR /&gt;16, Panama&lt;BR /&gt;17, Qatar&lt;BR /&gt;18, Rwanda&lt;BR /&gt;19, Saint Kitts and Nevis&lt;BR /&gt;20, Tajikistan&lt;BR /&gt;21, Uzbekistan&lt;BR /&gt;21, Vanuatu&lt;BR /&gt;21, Yemen&lt;BR /&gt;21, Zimbabwe ];&lt;/P&gt;&lt;P&gt;Subscriptions:&lt;BR /&gt;LOAD * INLINE [ Subscription_ID, Customer_ID, Product_ID, Value&lt;BR /&gt;1, 1, 1, 1200&lt;BR /&gt;2, 2, 1, 1200&lt;BR /&gt;3, 3, 1, 1200&lt;BR /&gt;4, 4, 1, 1200&lt;BR /&gt;5, 5, 1, 1200&lt;BR /&gt;6, 5, 2, 2400&lt;BR /&gt;7, 5, 3, 3600&lt;BR /&gt;8, 6, 1, 1200&lt;BR /&gt;9, 6, 2, 2400&lt;BR /&gt;10, 6, 3, 3600&lt;BR /&gt;11, 6, 4, 5700&lt;BR /&gt;12, 6, 5, 8000&lt;BR /&gt;13, 6, 6, 8150&lt;BR /&gt;14, 7, 1, 1200&lt;BR /&gt;15, 7, 2, 2400&lt;BR /&gt;16, 7, 3, 3600&lt;BR /&gt;17, 7, 4, 5700&lt;BR /&gt;18, 7, 5, 8000&lt;BR /&gt;19, 7, 6, 8150&lt;BR /&gt;20, 7, 7, 8275 ];&lt;/P&gt;&lt;P&gt;I have tried using sum(value) as the expression and this as the dimension:&lt;/P&gt;&lt;P&gt;=aggr(if(rank(Product_Name) &amp;lt;= 4, Value), Value)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This however ignores anywhere with &amp;gt; 4 subscriptions, but also does not combine all values where they subscribe to &amp;lt;= 4. I was expecting to see part of the pie chart say (blue) 69,975 (as that is the value of all accounts with &amp;lt;= 4 subscriptions), then another part which says 8,400 as say red, as one customer has 7 subscriptions and would not fall within the combined group...&lt;/P&gt;&lt;P&gt;Any help on this would be fab!&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Jimmy9008</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>How to combine values in a pie chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-values-in-a-pie-chart/m-p/1557078#M744642</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I am trying to create a pie chart that will group companies by number of subscriptions, and combine them where the total value is &amp;lt; 9000.&lt;/P&gt;&lt;P&gt;For example, the key would be:&lt;/P&gt;&lt;P&gt;Number of Subscriptions:&lt;/P&gt;&lt;P&gt;8&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;4&amp;nbsp;or less subscriptions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Say 200 companies have 4 or less subscriptions, the total value of their combined subscriptions should be grouped together as one value on the pie chart and shown as one colour. The rest (5 to &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; should have their values in total too, so the total value of all companies with 5 subscriptions (as say blue in the pie chart), the total value of all companies with 6 as red etc, but represented as different sections of the pie...&lt;/P&gt;&lt;P&gt;I am finding it difficult to figure out what my dimensions should be and expressions. This is the inline test data:&lt;/P&gt;&lt;P&gt;Customers:&lt;BR /&gt;LOAD * INLINE [ Customer_ID, Customer_Name&lt;BR /&gt;1, Indeedly Ltd&lt;BR /&gt;2, Hopably Plc&lt;BR /&gt;3, Hticly Ltd&lt;BR /&gt;4, Voticly Partnerships&lt;BR /&gt;5, Woulse&lt;BR /&gt;6, Certable&lt;BR /&gt;7, Vertab&lt;BR /&gt;8, Exreed&lt;BR /&gt;9, Sensly&lt;BR /&gt;10, Perfectly Grown Planting Co&lt;BR /&gt;11, Well.ly&lt;BR /&gt;12, Perescope&lt;BR /&gt;13, Howvent&lt;BR /&gt;14, Cachimp&lt;BR /&gt;15, HWHeres&lt;BR /&gt;16, Creaat&lt;BR /&gt;17, Hably&lt;BR /&gt;18, Justable&lt;BR /&gt;19, Acurew ];&lt;/P&gt;&lt;P&gt;Products:&lt;BR /&gt;LOAD * INLINE [ Product_ID, Product_Name&lt;BR /&gt;1, Afghanistan&lt;BR /&gt;2, Bahrain&lt;BR /&gt;3, Cambodia&lt;BR /&gt;4, Democratic Republic of the Congo&lt;BR /&gt;5, El Salvador&lt;BR /&gt;6, Gambia&lt;BR /&gt;7, Honduras&lt;BR /&gt;8, Indonesia&lt;BR /&gt;9, Japan&lt;BR /&gt;11, Kazakhstan&lt;BR /&gt;12, Laos&lt;BR /&gt;13, Madagascar&lt;BR /&gt;14, Nauru&lt;BR /&gt;15, Oman&lt;BR /&gt;16, Panama&lt;BR /&gt;17, Qatar&lt;BR /&gt;18, Rwanda&lt;BR /&gt;19, Saint Kitts and Nevis&lt;BR /&gt;20, Tajikistan&lt;BR /&gt;21, Uzbekistan&lt;BR /&gt;21, Vanuatu&lt;BR /&gt;21, Yemen&lt;BR /&gt;21, Zimbabwe ];&lt;/P&gt;&lt;P&gt;Subscriptions:&lt;BR /&gt;LOAD * INLINE [ Subscription_ID, Customer_ID, Product_ID, Value&lt;BR /&gt;1, 1, 1, 1200&lt;BR /&gt;2, 2, 1, 1200&lt;BR /&gt;3, 3, 1, 1200&lt;BR /&gt;4, 4, 1, 1200&lt;BR /&gt;5, 5, 1, 1200&lt;BR /&gt;6, 5, 2, 2400&lt;BR /&gt;7, 5, 3, 3600&lt;BR /&gt;8, 6, 1, 1200&lt;BR /&gt;9, 6, 2, 2400&lt;BR /&gt;10, 6, 3, 3600&lt;BR /&gt;11, 6, 4, 5700&lt;BR /&gt;12, 6, 5, 8000&lt;BR /&gt;13, 6, 6, 8150&lt;BR /&gt;14, 7, 1, 1200&lt;BR /&gt;15, 7, 2, 2400&lt;BR /&gt;16, 7, 3, 3600&lt;BR /&gt;17, 7, 4, 5700&lt;BR /&gt;18, 7, 5, 8000&lt;BR /&gt;19, 7, 6, 8150&lt;BR /&gt;20, 7, 7, 8275 ];&lt;/P&gt;&lt;P&gt;I have tried using sum(value) as the expression and this as the dimension:&lt;/P&gt;&lt;P&gt;=aggr(if(rank(Product_Name) &amp;lt;= 4, Value), Value)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This however ignores anywhere with &amp;gt; 4 subscriptions, but also does not combine all values where they subscribe to &amp;lt;= 4. I was expecting to see part of the pie chart say (blue) 69,975 (as that is the value of all accounts with &amp;lt;= 4 subscriptions), then another part which says 8,400 as say red, as one customer has 7 subscriptions and would not fall within the combined group...&lt;/P&gt;&lt;P&gt;Any help on this would be fab!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-values-in-a-pie-chart/m-p/1557078#M744642</guid>
      <dc:creator>Jimmy9008</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
  </channel>
</rss>

