<?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 Create a new measure based on specific combinations of dimensions in a pivot table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Create-a-new-measure-based-on-specific-combinations-of/m-p/1584598#M42753</link>
    <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I need your help in finding a solution for the following issue:&lt;BR /&gt;I have a chart that displays &lt;STRONG&gt;Sales&lt;/STRONG&gt; by &lt;STRONG&gt;Sources, Countries, and Months&lt;/STRONG&gt; (all being filters as well).&lt;BR /&gt;I need another measure (&lt;STRONG&gt;Monthly Sales&lt;/STRONG&gt;) to display in each row the values of total sales for that month for all countries from that source, like to see in each row the sales for a country (in Sales column) and the sales from all countries in that month (in Monthly Sales column)&lt;/P&gt;&lt;P&gt;e.g. from below example, in Source 1, in January (marked in red), I should have for Monthly Sales (sum of sales for all countries) = $5&lt;SPAN&gt;6+$1+&lt;/SPAN&gt;&lt;SPAN&gt;$207= $264, and for February (marked in blue) = $81+$3+$252= $336.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ex.JPG" style="width: 354px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/12640iB79E7169E9933C9D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ex.JPG" alt="ex.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I could easily get this in Excel by creating a new column in the raw data table, with =SUMIFS([Sales],[Source],[@Source],[Month],[@Month]), then inserting a pivot table and get those values:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="excel.JPG" style="width: 212px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/12636iB239AEF198BD1043/image-size/large?v=v2&amp;amp;px=999" role="button" title="excel.JPG" alt="excel.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've tried this:&amp;nbsp;if(dimensionality()=3,sum (all{&amp;lt;Country=p(Country)&amp;gt;}Measure1)), but I get the correct number just when i filter a source and a month &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;*Please note that&amp;nbsp;switching dimensions order is not a valid solution for my situation (even if I'll get the values I need) because i need this structure (Source, Country, Month) and i have other measures to calculate.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;BR /&gt;Simona&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 05:45:02 GMT</pubDate>
    <dc:creator>Simona</dc:creator>
    <dc:date>2024-11-16T05:45:02Z</dc:date>
    <item>
      <title>Create a new measure based on specific combinations of dimensions in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-new-measure-based-on-specific-combinations-of/m-p/1584598#M42753</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I need your help in finding a solution for the following issue:&lt;BR /&gt;I have a chart that displays &lt;STRONG&gt;Sales&lt;/STRONG&gt; by &lt;STRONG&gt;Sources, Countries, and Months&lt;/STRONG&gt; (all being filters as well).&lt;BR /&gt;I need another measure (&lt;STRONG&gt;Monthly Sales&lt;/STRONG&gt;) to display in each row the values of total sales for that month for all countries from that source, like to see in each row the sales for a country (in Sales column) and the sales from all countries in that month (in Monthly Sales column)&lt;/P&gt;&lt;P&gt;e.g. from below example, in Source 1, in January (marked in red), I should have for Monthly Sales (sum of sales for all countries) = $5&lt;SPAN&gt;6+$1+&lt;/SPAN&gt;&lt;SPAN&gt;$207= $264, and for February (marked in blue) = $81+$3+$252= $336.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ex.JPG" style="width: 354px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/12640iB79E7169E9933C9D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ex.JPG" alt="ex.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I could easily get this in Excel by creating a new column in the raw data table, with =SUMIFS([Sales],[Source],[@Source],[Month],[@Month]), then inserting a pivot table and get those values:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="excel.JPG" style="width: 212px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/12636iB239AEF198BD1043/image-size/large?v=v2&amp;amp;px=999" role="button" title="excel.JPG" alt="excel.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've tried this:&amp;nbsp;if(dimensionality()=3,sum (all{&amp;lt;Country=p(Country)&amp;gt;}Measure1)), but I get the correct number just when i filter a source and a month &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;*Please note that&amp;nbsp;switching dimensions order is not a valid solution for my situation (even if I'll get the values I need) because i need this structure (Source, Country, Month) and i have other measures to calculate.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;BR /&gt;Simona&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:45:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-new-measure-based-on-specific-combinations-of/m-p/1584598#M42753</guid>
      <dc:creator>Simona</dc:creator>
      <dc:date>2024-11-16T05:45:02Z</dc:date>
    </item>
  </channel>
</rss>

