<?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 Re: Add &amp;quot;National&amp;quot; to dataset that only has Regions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534879#M108462</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/349273"&gt;@Adfc_NZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I succeeded by changing the script as follows.&lt;/P&gt;&lt;P&gt;I have found that GetSelectedCount(Region) is not calculated.&lt;BR /&gt;So I set it as a variable to receive it as a constant value.&lt;/P&gt;&lt;P&gt;************&lt;/P&gt;&lt;P&gt;Let vRegionSelectedCount = &lt;FONT color="#FF0000"&gt;$(vCountCountry)&lt;/FONT&gt;;&lt;BR /&gt;Let P = HCNoRows();&lt;BR /&gt;If $(vRegionSelectedCount)= 0 then&lt;BR /&gt;For J = 1 to P&lt;BR /&gt;Let &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;vRegionSelectedCount&lt;/FONT&gt;&lt;/STRONG&gt; = vRegionSelectedCount + HCValue(#hc1.measure.1, J);&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Add Load&lt;BR /&gt;'National' as Country,&lt;BR /&gt;$(&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;vRegionSelectedCount&lt;/FONT&gt;&lt;/STRONG&gt;) as 'Budget ($)'&lt;BR /&gt;Autogenerate 1;&lt;BR /&gt;end if&lt;/P&gt;&lt;P&gt;**********************&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hanna_choi_2-1761869333678.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184589iCBAF12D0C2CB8BA6/image-size/large?v=v2&amp;amp;px=999" role="button" title="hanna_choi_2-1761869333678.png" alt="hanna_choi_2-1761869333678.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&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="hanna_choi_0-1761869185496.png" style="width: 460px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184587iFC91420A5619BEEE/image-dimensions/460x177?v=v2" width="460" height="177" role="button" title="hanna_choi_0-1761869185496.png" alt="hanna_choi_0-1761869185496.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hanna_choi_1-1761869265939.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184588i314419A8A4142EF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="hanna_choi_1-1761869265939.png" alt="hanna_choi_1-1761869265939.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;***If I select Canada, the chart is display only canada and 'National' is disappear.&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="hanna_choi_3-1761869388189.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184590i7C62BD930449AF41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hanna_choi_3-1761869388189.png" alt="hanna_choi_3-1761869388189.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Oct 2025 00:12:12 GMT</pubDate>
    <dc:creator>hanna_choi</dc:creator>
    <dc:date>2025-10-31T00:12:12Z</dc:date>
    <item>
      <title>Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2533659#M108255</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a set of transactional data that uses a dim table with the regions. All good here, nothing special.&lt;/P&gt;&lt;P&gt;Issue is, the customer wants a barchart with an "extra" bar representing the "national", i.e. the totals.&lt;/P&gt;&lt;P&gt;I need your help and advise on this, because as I can see it, I have 2 options:&lt;/P&gt;&lt;P&gt;1- Summarise the data in the load script and concatenate it back to the fact with the "Region" being "National"&lt;/P&gt;&lt;P&gt;A few pros and cons, the major con imo is the fact that I'd then need to exclude "National" from all other areas of the app where "National" is not needed&lt;/P&gt;&lt;P&gt;2- Create a Dimension with the list of the Regions + "National", then in a measure in the chart to display each region + the national, use "Pick(Match(" along with 1 Set Analysis per region (that actually exist in the dataset) plus another where "Region=" then sums the amount.&lt;/P&gt;&lt;P&gt;This works very well, but the major con is that because of the Set Analysis the Region filter no longer works on this visual.&lt;/P&gt;&lt;P&gt;I am inclined to go with option 2, but just wondered if anyone here has a different solution to this requirement which might be more "flexible" than the 2 above?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 19:35:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2533659#M108255</guid>
      <dc:creator>Adfc_NZ</dc:creator>
      <dc:date>2025-10-16T19:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2533692#M108262</link>
      <description>&lt;P&gt;I suggest creating a dimension table for regions.&lt;/P&gt;&lt;P&gt;Let's assume you have this transaction table:&lt;/P&gt;&lt;P&gt;SalesData:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;id, region, sales_amount&lt;/P&gt;&lt;P&gt;1, North, 5500&lt;/P&gt;&lt;P&gt;2, South, 7200&lt;/P&gt;&lt;P&gt;3, East, 4100&lt;/P&gt;&lt;P&gt;4, West, 8900&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can create a table like this&lt;/P&gt;&lt;P&gt;RegionGrouping:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;region, RegionReportGroup&lt;BR /&gt;North, North&lt;BR /&gt;North, National&lt;BR /&gt;South, South&lt;BR /&gt;South, National&lt;BR /&gt;East, East&lt;BR /&gt;East, National&lt;BR /&gt;West, West&lt;BR /&gt;West, National&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then use only that report region where you need the both region and national, else you continue to use region&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 04:57:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2533692#M108262</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2025-10-17T04:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2533693#M108263</link>
      <description>&lt;P&gt;Another, less known, method for this is to use chart level scripting. I think your case can be a very good fit for it.&lt;/P&gt;&lt;P&gt;See:&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/chart-level-scripting.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/chart-level-scripting.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 05:00:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2533693#M108263</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2025-10-17T05:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2533698#M108265</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/349273"&gt;@Adfc_NZ&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What do you think of using the Chart Level Script feature?&lt;BR /&gt;This feature is available for Aug 2022 and later versions.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;***** Script&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let vTotalSales = 0;&lt;BR /&gt;Let P = HCNoRows();&lt;BR /&gt;For J = 1 to P&lt;BR /&gt;Let vTotalSales = vTotalSales + HCValue(#hc1.measure.1, J);&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;Add Load&lt;BR /&gt;'Total Sales' as Country,&amp;nbsp; &amp;nbsp; //Country is dimension Label.&lt;BR /&gt;$(vTotalSales) as Sales&amp;nbsp; &amp;nbsp; //Sales is measure Label.&lt;BR /&gt;Autogenerate 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="hanna_choi_0-1760678645473.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184285iAD20738835DC7862/image-size/large?v=v2&amp;amp;px=999" role="button" title="hanna_choi_0-1760678645473.png" alt="hanna_choi_0-1760678645473.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 05:25:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2533698#M108265</guid>
      <dc:creator>hanna_choi</dc:creator>
      <dc:date>2025-10-17T05:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2533719#M108268</link>
      <description>&lt;P&gt;Your second approach could in general be working without any conditional parts - the pick(match()) - or any set analysis. Just using the extra dimension from&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/The-As-Of-Table/ba-p/1466130" target="_blank"&gt;The As-Of Table - Qlik Community - 1466130&lt;/A&gt;&amp;nbsp;and sum(MyField).&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 09:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2533719#M108268</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-10-17T09:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534626#M108408</link>
      <description>&lt;P&gt;Thank you everyone for your replies, all very interesting!&lt;/P&gt;&lt;P&gt;But I neglected to say something very important, this is re Qlik Cloud, where I cannot see the "Chart Scripting" option.&lt;/P&gt;&lt;P&gt;I am going to try Vegar's suggestion to use a dim table for regions.&lt;/P&gt;&lt;P&gt;Thank you again to everyone. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 21:55:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534626#M108408</guid>
      <dc:creator>Adfc_NZ</dc:creator>
      <dc:date>2025-10-28T21:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534630#M108409</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/349273"&gt;@Adfc_NZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The chart script function must be enabled in the app settings.&lt;BR /&gt;Once enabled , you can check the chart script menu in the chart.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hanna_choi_0-1761696379811.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184530i0195D3B1390B390C/image-size/large?v=v2&amp;amp;px=999" role="button" title="hanna_choi_0-1761696379811.png" alt="hanna_choi_0-1761696379811.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Oct 2025 00:07:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534630#M108409</guid>
      <dc:creator>hanna_choi</dc:creator>
      <dc:date>2025-10-29T00:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534769#M108441</link>
      <description>&lt;P&gt;Hi Hanna_choi,&lt;/P&gt;&lt;P&gt;Thank you for showing me something new, there's always something to learn isn't there?! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, from the sample script you posted, I am assuming I need to replace "#hc1.measure.1" with my measure, am I correct? What else do I need to adjust to "match" my visual/dimensions/measures?&lt;/P&gt;&lt;P&gt;As I've never user Chart Scripts I am flying completely blind here, sorry...&lt;/P&gt;&lt;P&gt;And again, thank you. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2025 07:52:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534769#M108441</guid>
      <dc:creator>Adfc_NZ</dc:creator>
      <dc:date>2025-10-30T07:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534770#M108442</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/349273"&gt;@Adfc_NZ&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You need to configure the red part to be the same as the label of the measure and dimension.&lt;/P&gt;&lt;P&gt;The inquired '#hc1.measure.1' is a function that utilizes the measurements defined in the graph.&lt;/P&gt;&lt;P&gt;***** Script&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let vTotalSales = 0;&lt;BR /&gt;Let P = HCNoRows();&lt;BR /&gt;For J = 1 to P&lt;BR /&gt;Let vTotalSales = vTotalSales + HCValue(#hc1.measure.1, J);&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;Add Load&lt;BR /&gt;'Total Sales' as &lt;FONT color="#FF0000"&gt;Country&lt;/FONT&gt;,&amp;nbsp; &amp;nbsp; //Country is dimension Label.&lt;BR /&gt;$(vTotalSales) as &lt;FONT color="#FF0000"&gt;Sales&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; //Sales is measure Label.&lt;BR /&gt;Autogenerate 1;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2025 07:59:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534770#M108442</guid>
      <dc:creator>hanna_choi</dc:creator>
      <dc:date>2025-10-30T07:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534772#M108443</link>
      <description>&lt;P&gt;Hi Hanna_choi,&lt;/P&gt;&lt;P&gt;Amazing!! Thank you so much, that did the trick.&lt;/P&gt;&lt;P&gt;But, and risking sounding ungrateful for all the help so far (hope not), there's only one issue: obviously this&amp;nbsp; new dimension value/column won't respond to "Region" filtering (it doesn't "go away" :D) as it isn't a "real region". Is there any function that could be used somehow, to check if the filter is being used to make the "National" column disappear?&lt;/P&gt;&lt;P&gt;Thank you again!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2025 08:05:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534772#M108443</guid>
      <dc:creator>Adfc_NZ</dc:creator>
      <dc:date>2025-10-30T08:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534779#M108444</link>
      <description>&lt;P&gt;I tried adding the following:&lt;/P&gt;&lt;P&gt;Let vRegionSelectedCount = GetSelectedCount(Region);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then wrap the "Add Load" inside an if:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;&lt;U&gt;If $(vRegionSelectedCount)= 0 then&lt;/U&gt;&lt;/FONT&gt;&lt;BR /&gt;For J = 1 to P&lt;BR /&gt;Let vTotalSales = vTotalSales + HCValue(#hc1.measure.1, J);&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Add Load&lt;BR /&gt;'National' as Region, //Country is dimension Label.&lt;BR /&gt;$(vTotalSales) as 'Budget ($)' //Sales is measure Label.&lt;BR /&gt;Autogenerate 1;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;end if&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;But this doesn't work:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-10-30 212532.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184569iD0B9C3654E3C4490/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-10-30 212532.png" alt="Screenshot 2025-10-30 212532.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;What am I doing wrong? Or is this not even possible?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2025 08:29:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534779#M108444</guid>
      <dc:creator>Adfc_NZ</dc:creator>
      <dc:date>2025-10-30T08:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534879#M108462</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/349273"&gt;@Adfc_NZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I succeeded by changing the script as follows.&lt;/P&gt;&lt;P&gt;I have found that GetSelectedCount(Region) is not calculated.&lt;BR /&gt;So I set it as a variable to receive it as a constant value.&lt;/P&gt;&lt;P&gt;************&lt;/P&gt;&lt;P&gt;Let vRegionSelectedCount = &lt;FONT color="#FF0000"&gt;$(vCountCountry)&lt;/FONT&gt;;&lt;BR /&gt;Let P = HCNoRows();&lt;BR /&gt;If $(vRegionSelectedCount)= 0 then&lt;BR /&gt;For J = 1 to P&lt;BR /&gt;Let &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;vRegionSelectedCount&lt;/FONT&gt;&lt;/STRONG&gt; = vRegionSelectedCount + HCValue(#hc1.measure.1, J);&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Add Load&lt;BR /&gt;'National' as Country,&lt;BR /&gt;$(&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;vRegionSelectedCount&lt;/FONT&gt;&lt;/STRONG&gt;) as 'Budget ($)'&lt;BR /&gt;Autogenerate 1;&lt;BR /&gt;end if&lt;/P&gt;&lt;P&gt;**********************&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hanna_choi_2-1761869333678.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184589iCBAF12D0C2CB8BA6/image-size/large?v=v2&amp;amp;px=999" role="button" title="hanna_choi_2-1761869333678.png" alt="hanna_choi_2-1761869333678.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&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="hanna_choi_0-1761869185496.png" style="width: 460px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184587iFC91420A5619BEEE/image-dimensions/460x177?v=v2" width="460" height="177" role="button" title="hanna_choi_0-1761869185496.png" alt="hanna_choi_0-1761869185496.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hanna_choi_1-1761869265939.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184588i314419A8A4142EF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="hanna_choi_1-1761869265939.png" alt="hanna_choi_1-1761869265939.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;***If I select Canada, the chart is display only canada and 'National' is disappear.&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="hanna_choi_3-1761869388189.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184590i7C62BD930449AF41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hanna_choi_3-1761869388189.png" alt="hanna_choi_3-1761869388189.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 00:12:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534879#M108462</guid>
      <dc:creator>hanna_choi</dc:creator>
      <dc:date>2025-10-31T00:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Add "National" to dataset that only has Regions</title>
      <link>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534880#M108463</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/16864"&gt;@hanna_choi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Great idea, calculate the SelectedCount outside and then pass it into the script, love it! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time, this solution will work brilliantly.&lt;/P&gt;&lt;P&gt;And thanks also to everyone who contributed with ideas! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 00:17:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-quot-National-quot-to-dataset-that-only-has-Regions/m-p/2534880#M108463</guid>
      <dc:creator>Adfc_NZ</dc:creator>
      <dc:date>2025-10-31T00:17:56Z</dc:date>
    </item>
  </channel>
</rss>

