<?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: Generate Country and State Numbers based on Region numbers in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397176#M800705</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For every expression you have to load the same table multiple time with respected granularity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example &lt;/P&gt;&lt;P&gt;1: If you want calculate sum of Products on Whole Month wise and &lt;SPAN style="font-size: 13.3333px;"&gt;Counts of Visits on Whole(i.e, Country)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;P&gt;Load Month,&lt;/P&gt;&lt;P&gt;Sum([Total Products]) as sum_of_products_month_wise,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count(Distinct [Visit ID]) as count_of_visit_id_whole_month_wise&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;from Data.xlsx&lt;/P&gt;&lt;P&gt;group by Month;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Nov 2017 09:13:20 GMT</pubDate>
    <dc:creator>PrashantSangle</dc:creator>
    <dc:date>2017-11-30T09:13:20Z</dc:date>
    <item>
      <title>Generate Country and State Numbers based on Region numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397171#M800700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have my data as in the Excel attached. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Overview:&lt;/P&gt;&lt;P&gt;Basically, i have a Month, StateID and RegionID corresponding to the State along with the Visit IDs and the Number of Products as KPIs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, i want to use this KPIs(Visit ID and ProductSum) and generate 4 new columns.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Count of Visits per State&lt;/LI&gt;&lt;LI&gt;Sum of Products per State&lt;/LI&gt;&lt;LI&gt;Counts of Visits on Whole(i.e, Country)&lt;/LI&gt;&lt;LI&gt;Sum of Products on Whole(i.e, Country)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, see the attached Excel to get a more detail overview and expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do this at script level and store the values in a qvd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE:&lt;/P&gt;&lt;P&gt;Visits is always count and Products is always Sum.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397171#M800700</guid>
      <dc:creator>psk180590</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Country and State Numbers based on Region numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397172#M800701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try like this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Total Visits Region&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Count( total &amp;lt;[Region ID],Month&amp;gt; distinct [Visit ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum of Products Region&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sum( total &amp;lt;[Region ID],Month&amp;gt; [Total Products])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 16:40:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397172#M800701</guid>
      <dc:creator>devarasu07</dc:creator>
      <dc:date>2017-11-29T16:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Country and State Numbers based on Region numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397173#M800702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refer to the attached output. it's similar to sql group by class with count &amp;amp; sum function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Total Visits Region&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Count( total &amp;lt;[Region ID],Month&amp;gt; distinct [Visit ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum of Products Region&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sum( total &amp;lt;[Region ID],Month&amp;gt; [Total Products])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Total Visits State&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Count( total &amp;lt;[State ID],Month&amp;gt; distinct [Visit ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum of Products State&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sum( total &amp;lt;[State ID],Month&amp;gt; [Total Products])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Total Visits Country&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Count( total &amp;lt;Month&amp;gt; distinct [Visit ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum of Products Country&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sum( total &amp;lt;Month&amp;gt; [Total Products])&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="185136" alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/185136_Capture.JPG" style="height: 185px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Close your thread by marking as correct.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Deva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 16:49:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397173#M800702</guid>
      <dc:creator>devarasu07</dc:creator>
      <dc:date>2017-11-29T16:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Country and State Numbers based on Region numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397174#M800703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion but, i want to generate this at the script level not at the application level using Set Analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 08:28:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397174#M800703</guid>
      <dc:creator>psk180590</dc:creator>
      <dc:date>2017-11-30T08:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Country and State Numbers based on Region numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397175#M800704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone here faced a similar situation before hand?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 08:56:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397175#M800704</guid>
      <dc:creator>psk180590</dc:creator>
      <dc:date>2017-11-30T08:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Country and State Numbers based on Region numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397176#M800705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For every expression you have to load the same table multiple time with respected granularity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example &lt;/P&gt;&lt;P&gt;1: If you want calculate sum of Products on Whole Month wise and &lt;SPAN style="font-size: 13.3333px;"&gt;Counts of Visits on Whole(i.e, Country)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;P&gt;Load Month,&lt;/P&gt;&lt;P&gt;Sum([Total Products]) as sum_of_products_month_wise,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count(Distinct [Visit ID]) as count_of_visit_id_whole_month_wise&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;from Data.xlsx&lt;/P&gt;&lt;P&gt;group by Month;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 09:13:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397176#M800705</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2017-11-30T09:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Country and State Numbers based on Region numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397177#M800706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you want these function in script level only.Try this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Visit ID &lt;/P&gt;&lt;P&gt;Group by Region as Total_visits_Region,&lt;/P&gt;&lt;P&gt;Visit ID group by state as &lt;SPAN style="font-size: 13.3333px;"&gt;Total_visits_state&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Visit ID group by country as &lt;SPAN style="font-size: 13.3333px;"&gt;Total_visits_country&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;sum(Total Products) group by Region as sum_of_total_products_region,&lt;/P&gt;&lt;P&gt;sum(Total Products ) group by state as sum_of_total_products_state,&lt;/P&gt;&lt;P&gt;sum(Total products) Group by country as &lt;SPAN style="font-size: 13.3333px;"&gt;sum_of_total_products_country&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Resident&amp;nbsp; (above table name);&lt;/P&gt;&lt;P&gt;Drop table (above table);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 09:49:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397177#M800706</guid>
      <dc:creator>manoj217</dc:creator>
      <dc:date>2017-11-30T09:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Country and State Numbers based on Region numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397178#M800708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load Visit ID&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Group by Region as Total_visits_Region,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Visit ID group by state as &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Total_visits_state&lt;/SPAN&gt;,count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Total_visits_state&lt;/SPAN&gt;),&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Visit ID group by country as &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Total_visits_country&lt;/SPAN&gt;,count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Total_visits_country&lt;/SPAN&gt;)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum(Total Products) group by Region as sum_of_total_products_region,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum(Total Products ) group by state as sum_of_total_products_state,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum(Total products) Group by country as &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;sum_of_total_products_country&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident&amp;nbsp; (above table name);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Drop table (above table);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 09:55:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397178#M800708</guid>
      <dc:creator>manoj217</dc:creator>
      <dc:date>2017-11-30T09:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Country and State Numbers based on Region numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397179#M800710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestions. This is turning out to be a bit more complicated than it seems to be. I have made a sample app and also a few screen shots below to explain better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Ex:&lt;/P&gt;&lt;P&gt;In the month Jan i should see the following Numbers for those particular selections&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Country - 10 Visits(Count OF Distinct Visit ID) and 12 Products(Sum of Total Products)&amp;nbsp;&amp;nbsp; - Irrespective of selection&lt;/P&gt;&lt;P&gt;State 1000 - 9 Visits and 9 Products&amp;nbsp; - When State 1000 is selected&lt;/P&gt;&lt;P&gt;Region 1002 - 8 Visits and 9 Products -&amp;nbsp; When Region 1002 is selected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, if you see the application it gives me some completely different numbers.&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/185218_Capture.JPG" style="height: 291px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Country Numbers should not Respond if a State or Region is selected and the State numbers should not respond if a Region is selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, provide your valuable suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 10:30:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Country-and-State-Numbers-based-on-Region-numbers/m-p/1397179#M800710</guid>
      <dc:creator>psk180590</dc:creator>
      <dc:date>2017-11-30T10:30:55Z</dc:date>
    </item>
  </channel>
</rss>

