<?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: Measure per 10000 people in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778257#M15580</link>
    <description>Ups, never mention... We are on VA 7.5</description>
    <pubDate>Wed, 03 Nov 2021 16:49:01 GMT</pubDate>
    <dc:creator>LukeL</dc:creator>
    <dc:date>2021-11-03T16:49:01Z</dc:date>
    <item>
      <title>Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778003#M15574</link>
      <description>Hi all.&lt;BR /&gt;I'm pretty sure it will not possible to do, but I hope there is some nice truck I do not know to perform this...&lt;BR /&gt;I have a dataset containing lines as&lt;BR /&gt;City1 District1 Sex1 Event1 Class1 Measure&lt;BR /&gt;City1 District2 Sex1 Event2 Class1 Measure&lt;BR /&gt;City1 District1 Sex2 Event1 Class1 Measure&lt;BR /&gt;CityN DistrictN Sex1 Event2 Class2 Measure&lt;BR /&gt;And so on...&lt;BR /&gt;What I need to display in VA is measure per (10000) people.&lt;BR /&gt;Clearly, people depend on City district and sex, but not on event and class. There are lots more variables not changing population, and all are used as possible filters.&lt;BR /&gt;Is there a way to dinamically create the per people measure dinamically?&lt;BR /&gt;Ie, the population is&lt;BR /&gt;City1 District1 Sex1 Pop1&lt;BR /&gt;City1 District1 Sex2 Pop2&lt;BR /&gt;City1 District2 Sex1 Pop3&lt;BR /&gt;City1 District2 Sex2 Pop4&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;So if I'm looking the city events the have to be over pop1+pop2+pop3+pop4, if I'm also on sex, pop1+pop3 and pop2+pop4... And so on... &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope the explanation is clear... &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;BR /&gt;Thanks anyone &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Nov 2021 19:16:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778003#M15574</guid>
      <dc:creator>LukeL</dc:creator>
      <dc:date>2021-11-02T19:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778013#M15575</link>
      <description>Couple of options depending on exactly what you want. &lt;BR /&gt;&lt;BR /&gt;1. Convert the units to be aggregated ahead of time but pop1/10000+pop2/10000 = (pop1 + pop2)/10000 so scaling the individual values ahead of time will work, unless you're standardizing the events over the population/another variable (not clear). &lt;BR /&gt;2. Have SAS display values in tens of thousands using a custom format</description>
      <pubDate>Tue, 02 Nov 2021 20:00:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778013#M15575</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-02T20:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778127#M15579</link>
      <description>&lt;P&gt;Ok, I think I may not have expressed myself clearly.&lt;/P&gt;
&lt;P&gt;I'd try to make a better example for my problem...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suppose you have these two tables of event and population:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data TEST;
    length CITY DISTRICT EVENT $5 QTY 8;
    input CITY DISTRICT EVENT QTY;

datalines;
City1 Dist1 Even1 2
City1 Dist1 Even2 4
City1 Dist1 Even3 6
City1 Dist1 Even4 4
City1 Dist2 Even1 1
City1 Dist1 Even1 2
City1 Dist1 Even1 4
City2 Dist1 Even4 15
City2 Dist1 Even1 7
City2 Dist2 Even1 9
;;
run;

data POPULATION;
    length CITY DISTRICT $5 POP 8;
    input CITY DISTRICT POP;

datalines;
City1 Dist1 100
City1 Dist2 123
City2 Dist1 45
City2 Dist2 96
;;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now on VA I have a cross table with a City &amp;gt; District hierarchy and a filter on events.&lt;/P&gt;
&lt;P&gt;What I need is this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No event filter active:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;City   Qty   Pop    Rate
City1  23    223    23/223x10000
City2  31    141    31/141x10000&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No event filter active but hierarchy open:&lt;/P&gt;
&lt;PRE&gt;City   District    Qty   Pop    Rate
City1  Dist1       22    100    22/100x10000
City1  Dist2       1     123    1/123x10000&lt;BR /&gt;City2  Dist1       22    45     22/45x10000&lt;BR /&gt;City2  Dist2       9     96     9/96x10000&lt;/PRE&gt;
&lt;P&gt;But if I activate a filter on an event, let's say event1, I need these output:&lt;/P&gt;
&lt;PRE&gt;City   Qty   Pop    Rate
City1  9     223    9/223x10000
City2  16    141    16/141x10000&lt;/PRE&gt;
&lt;PRE&gt;City   District    Qty   Pop    Rate
City1  Dist1       8     100    8/100x10000&lt;BR /&gt;City1  Dist2       1     123    1/123x10000
City2  Dist1       7     45     7/45x10000&lt;BR /&gt;City2  Dist2       9     96     9/96x10000&lt;/PRE&gt;
&lt;P&gt;So, basically, the Qty depends on the event variable, while the population depends only from City and District variabiles.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 11:37:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778127#M15579</guid>
      <dc:creator>LukeL</dc:creator>
      <dc:date>2021-11-03T11:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778257#M15580</link>
      <description>Ups, never mention... We are on VA 7.5</description>
      <pubDate>Wed, 03 Nov 2021 16:49:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778257#M15580</guid>
      <dc:creator>LukeL</dc:creator>
      <dc:date>2021-11-03T16:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778268#M15581</link>
      <description>Maybe I'm not understanding your question. Mathematically, if you need to multiply everything by 10000 you can do that to one of the columns then it flows through the rest. So if you create a new variable QTY_scaled = QTY*10000 and then do the calculations as QTY_scaled / POP it'll show as expected. &lt;BR /&gt;&lt;BR /&gt;Or are you having issues getting the aggregations to aggregate properly? If you scale QTY, it seems like the aggregations also scale.</description>
      <pubDate>Wed, 03 Nov 2021 17:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778268#M15581</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-03T17:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778273#M15582</link>
      <description>The problem is not on the per 100.000 part, but for the aggregation... I need the population only aggregate through city and district, but not for eample by event or other variables. If I put the population on the main dataset, I will have pop be summed for each event, giving completly wrong results. On the other hand, if I put the population on another dataset, as far as I know, I will not be able to construct the measure using measures from different data sources</description>
      <pubDate>Wed, 03 Nov 2021 17:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778273#M15582</guid>
      <dc:creator>LukeL</dc:creator>
      <dc:date>2021-11-03T17:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778282#M15583</link>
      <description>If I put the population on the main dataset, I will have pop be summed for each event, giving completly wrong results.&lt;BR /&gt;&lt;BR /&gt;What do you mean by this?</description>
      <pubDate>Wed, 03 Nov 2021 17:31:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778282#M15583</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-03T17:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778283#M15584</link>
      <description>Random check: &lt;BR /&gt;Is this the difference of the following that you're looking for:&lt;BR /&gt;Define your metric as SUM(EVENT)/SUM(POPULATION)*10000 not SUM(EVENT/POPULATION)*10000 &lt;BR /&gt;</description>
      <pubDate>Wed, 03 Nov 2021 17:37:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778283#M15584</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-03T17:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778285#M15585</link>
      <description>&lt;P&gt;Let's say I have these data:&lt;/P&gt;
&lt;PRE&gt;City  Dist  Event Qty     Pop
City1 Dist1 Even1 2       100
City1 Dist1 Even2 4       100
City1 Dist1 Even3 6       100
City1 Dist1 Even4 4       100
City1 Dist2 Even1 1       150
City1 Dist1 Even1 2       100
City1 Dist1 Even1 4       100
City2 Dist1 Even4 15      200
City2 Dist1 Even1 7       200
City2 Dist2 Even1 9       250&lt;/PRE&gt;
&lt;P&gt;If I compute the rate by row, I obtain the correct measure. But if I want to aggregate by city, for city1 ie I will obtain Qty=2+4+6+4+2+1+4=23 but I will also obtain Pop=100+100+100+100+150+100+100=750, that's wrong, since the right population is just 100+150=250.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 17:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778285#M15585</guid>
      <dc:creator>LukeL</dc:creator>
      <dc:date>2021-11-03T17:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778290#M15586</link>
      <description>It would be more somenthing like sum [by event] (QTY) / sum [by district] (POP) * 10000</description>
      <pubDate>Wed, 03 Nov 2021 17:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778290#M15586</guid>
      <dc:creator>LukeL</dc:creator>
      <dc:date>2021-11-03T17:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778292#M15587</link>
      <description>Unfortunately I don't know the answer to that one &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Nov 2021 17:49:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778292#M15587</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-03T17:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778572#M15588</link>
      <description>&lt;P&gt;Yesterday I had to overcome a similar challenge.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here comes a recipe for solving it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="Selective filtering in SAS Visual Analytics 8.2" href="https://blogs.sas.com/content/sgf/2018/09/05/selective-filtering-in-sas-visual-analytics-8-2/" target="_self"&gt;https://blogs.sas.com/content/sgf/2018/09/05/selective-filtering-in-sas-visual-analytics-8-2/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 18:05:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778572#M15588</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2021-11-04T18:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778584#M15589</link>
      <description>Thank you for pointing me that out... It is really interesting, but if I understand well, it works just with string based measures (count/count distinct/...) and not with numeric summable ones...</description>
      <pubDate>Thu, 04 Nov 2021 19:38:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778584#M15589</guid>
      <dc:creator>LukeL</dc:creator>
      <dc:date>2021-11-04T19:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778605#M15590</link>
      <description>No, it works for both cases.&lt;BR /&gt;You end up having new variables that underlay different filters. &lt;BR /&gt;Selected versus all for example.&lt;BR /&gt;That can't be achieved with normal filters but with parameters.</description>
      <pubDate>Thu, 04 Nov 2021 21:22:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778605#M15590</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2021-11-04T21:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778606#M15591</link>
      <description>It is 8.2 though, so not sure it's available in 7.5</description>
      <pubDate>Thu, 04 Nov 2021 21:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778606#M15591</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-04T21:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Measure per 10000 people</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778607#M15592</link>
      <description>Tomorrow I will try to implement it on my case, let's see what happen! Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 04 Nov 2021 21:24:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Measure-per-10000-people/m-p/778607#M15592</guid>
      <dc:creator>LukeL</dc:creator>
      <dc:date>2021-11-04T21:24:51Z</dc:date>
    </item>
  </channel>
</rss>

