<?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 Revenue for different date ranges by country in one table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848000#M70107</link>
    <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;I am struggling with a set expression to display the Sum(Revenue) achieved by each country within a promotion time frame. The problem is, that the products included in the promotion and the time frame for the promotion differ across countries although its the same promotion.&lt;/P&gt;&lt;P&gt;This is a simplified version of my data model:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="helena11_2-1634548806447.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64533i1DF517DC4AE4BCE5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="helena11_2-1634548806447.png" alt="helena11_2-1634548806447.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is what the final table should contain:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="helena11_1-1634548084206.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64517i35124CDFFE9DEE4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="helena11_1-1634548084206.png" alt="helena11_1-1634548084206.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now I do get this to work if the user selects only one country from the filter pane and in consequence only one country is displayed in the table. The formula for that looks like this:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;[Order Date]={"&amp;gt;=$(=Only([Promotion Start]))&amp;lt;=$(=Only([Promotion End]))"}&amp;gt;} If(Wildmatch([Country Name],GetFieldSelections([Country]),[Revenue]))&lt;/P&gt;&lt;P&gt;But as soon as I want to have one table that contains all countries I run into problems as how to account for the different date ranges and product ranges for each country. Does anyone have a suggestion how I could solve this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Mon, 18 Oct 2021 09:27:33 GMT</pubDate>
    <dc:creator>helena11</dc:creator>
    <dc:date>2021-10-18T09:27:33Z</dc:date>
    <item>
      <title>Revenue for different date ranges by country in one table</title>
      <link>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848000#M70107</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;I am struggling with a set expression to display the Sum(Revenue) achieved by each country within a promotion time frame. The problem is, that the products included in the promotion and the time frame for the promotion differ across countries although its the same promotion.&lt;/P&gt;&lt;P&gt;This is a simplified version of my data model:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="helena11_2-1634548806447.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64533i1DF517DC4AE4BCE5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="helena11_2-1634548806447.png" alt="helena11_2-1634548806447.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is what the final table should contain:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="helena11_1-1634548084206.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64517i35124CDFFE9DEE4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="helena11_1-1634548084206.png" alt="helena11_1-1634548084206.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now I do get this to work if the user selects only one country from the filter pane and in consequence only one country is displayed in the table. The formula for that looks like this:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;[Order Date]={"&amp;gt;=$(=Only([Promotion Start]))&amp;lt;=$(=Only([Promotion End]))"}&amp;gt;} If(Wildmatch([Country Name],GetFieldSelections([Country]),[Revenue]))&lt;/P&gt;&lt;P&gt;But as soon as I want to have one table that contains all countries I run into problems as how to account for the different date ranges and product ranges for each country. Does anyone have a suggestion how I could solve this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 09:27:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848000#M70107</guid>
      <dc:creator>helena11</dc:creator>
      <dc:date>2021-10-18T09:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Revenue for different date ranges by country in one table</title>
      <link>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848261#M70113</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/153125"&gt;@helena11&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you looking for the same result for revenue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abhijitnalekar_0-1634569575464.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64602i7992DEBD83F5844B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abhijitnalekar_0-1634569575464.png" alt="abhijitnalekar_0-1634569575464.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 15:06:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848261#M70113</guid>
      <dc:creator>abhijitnalekar</dc:creator>
      <dc:date>2021-10-18T15:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Revenue for different date ranges by country in one table</title>
      <link>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848532#M70129</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/49799"&gt;@abhijitnalekar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;no, actually I am looking for a different revenue per country.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 06:21:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848532#M70129</guid>
      <dc:creator>helena11</dc:creator>
      <dc:date>2021-10-19T06:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Revenue for different date ranges by country in one table</title>
      <link>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848551#M70131</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/153125"&gt;@helena11&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check the below output. hope you are looking the same.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abhijitnalekar_0-1634625700674.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64690i23B67AD0436BD435/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abhijitnalekar_0-1634625700674.png" alt="abhijitnalekar_0-1634625700674.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please check the attached QVF for reference.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 06:43:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848551#M70131</guid>
      <dc:creator>abhijitnalekar</dc:creator>
      <dc:date>2021-10-19T06:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Revenue for different date ranges by country in one table</title>
      <link>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848783#M70148</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/49799"&gt;@abhijitnalekar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you solved it with a set expression can you maybe post it here? My company does not allow the import of external QVF files.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 11:44:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848783#M70148</guid>
      <dc:creator>helena11</dc:creator>
      <dc:date>2021-10-19T11:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Revenue for different date ranges by country in one table</title>
      <link>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848784#M70149</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/153125"&gt;@helena11&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please check the below script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mcountry:&lt;BR /&gt;mapping&lt;BR /&gt;LOAD&lt;BR /&gt;OrderCountryID,&lt;BR /&gt;CountryName&lt;BR /&gt;FROM [lib://test/Dump.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [Country Detail]);&lt;/P&gt;
&lt;P&gt;Moroder:&lt;BR /&gt;Mapping&lt;BR /&gt;LOAD&lt;BR /&gt;OrderID,&lt;BR /&gt;ProductID&lt;BR /&gt;FROM [lib://test/Dump.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [Order Detail]);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tab1:&lt;/P&gt;
&lt;P&gt;LOAD&lt;BR /&gt;"Order ID" as OrderID,&lt;BR /&gt;OrderCountryID,&lt;BR /&gt;ApplyMap('Mcountry',OrderCountryID) as CName,&lt;BR /&gt;Applymap('Moroder',"Order ID") as ProductID,&lt;BR /&gt;"Order Date",&lt;BR /&gt;Revenue&lt;BR /&gt;FROM [lib://test/Dump.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [Order Review]);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;LOAD&lt;/P&gt;
&lt;P&gt;Country as CName,&lt;BR /&gt;"Promotion Start",&lt;BR /&gt;"Promotion End"&lt;BR /&gt;FROM [lib://test/Dump.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is PramotionDetail);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 11:51:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1848784#M70149</guid>
      <dc:creator>abhijitnalekar</dc:creator>
      <dc:date>2021-10-19T11:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Revenue for different date ranges by country in one table</title>
      <link>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1851708#M70356</link>
      <description>&lt;P&gt;Hi again&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/49799"&gt;@abhijitnalekar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;thanks for your help. I tried your solution with the mapping tables and it worked.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 08:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Revenue-for-different-date-ranges-by-country-in-one-table/m-p/1851708#M70356</guid>
      <dc:creator>helena11</dc:creator>
      <dc:date>2021-10-26T08:15:41Z</dc:date>
    </item>
  </channel>
</rss>

