<?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 Finding what percentage of targets are achieved using SAS arrays in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494366#M130254</link>
    <description>&lt;P&gt;The data set "Sales.csv" has details of number of units sold across regions of four products.The target sales across regions(North, East, West), of four products() is given as (9450,9100,8550,9700). With the help of SAS arrays I want to find, what was the percentage of targets achieved for each product-region pair.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Please find an attached file of &lt;STRONG&gt;"Sales.csv"&amp;nbsp;&lt;/STRONG&gt;with this post.&lt;/P&gt;&lt;P&gt;I haven't worked around this problem as am clueless for the approach. Some insights or workaround this is appreciated.&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
    <pubDate>Tue, 11 Sep 2018 02:32:48 GMT</pubDate>
    <dc:creator>mdhtrivedi</dc:creator>
    <dc:date>2018-09-11T02:32:48Z</dc:date>
    <item>
      <title>Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494366#M130254</link>
      <description>&lt;P&gt;The data set "Sales.csv" has details of number of units sold across regions of four products.The target sales across regions(North, East, West), of four products() is given as (9450,9100,8550,9700). With the help of SAS arrays I want to find, what was the percentage of targets achieved for each product-region pair.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Please find an attached file of &lt;STRONG&gt;"Sales.csv"&amp;nbsp;&lt;/STRONG&gt;with this post.&lt;/P&gt;&lt;P&gt;I haven't worked around this problem as am clueless for the approach. Some insights or workaround this is appreciated.&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 02:32:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494366#M130254</guid>
      <dc:creator>mdhtrivedi</dc:creator>
      <dc:date>2018-09-11T02:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494372#M130257</link>
      <description>Why arrays? Simple IF/THEN would work just as well. &lt;BR /&gt;&lt;BR /&gt;Write the code with IF/THEN statements first. Once you find the points of repetition you can figure out where to introduce the array to solve it.</description>
      <pubDate>Tue, 11 Sep 2018 02:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494372#M130257</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-11T02:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494373#M130258</link>
      <description>&lt;P&gt;Reeza,&lt;/P&gt;&lt;P&gt;My concern is how to do summation of each column of the dataset that would then be compared to the target values using IF/THEN statement. I thought it can be done using SAS arrays. Correct me if I am wrong.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 03:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494373#M130258</guid>
      <dc:creator>mdhtrivedi</dc:creator>
      <dc:date>2018-09-11T03:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494374#M130259</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/221100"&gt;@mdhtrivedi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Reeza,&lt;/P&gt;
&lt;P&gt;My concern is how to do summation of each column of the dataset that would then be compared to the target values using IF/THEN statement. I thought it can be done using SAS arrays. Correct me if I am wrong.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;There's always more than one way to solve a problem. Mine would be to use IF/THEN to create flags and use PROC MEANS to summarize the flags. This would easily allow for multiple levels of aggregation on demand.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Arrays in SAS are just variables shortcut references and work on a single row at a time. Is that what you're expecting to use?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 03:05:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494374#M130259</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-11T03:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494382#M130263</link>
      <description>&lt;P&gt;If you need to summarise columns in a data step, the RETAIN statement is usually the preferred method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, procedures summarise very well as pointed out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try it and then see if you need to ask further question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 03:37:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494382#M130263</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-09-11T03:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494493#M130320</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/221100"&gt;@mdhtrivedi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The data set "Sales.csv" has details of number of units sold across regions of four products.The target sales across regions(North, East, West), of four products() is given as (9450,9100,8550,9700). With the help of SAS arrays I want to find, what was the percentage of targets achieved for each product-region pair.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Please find an attached file of &lt;STRONG&gt;"Sales.csv"&amp;nbsp;&lt;/STRONG&gt;with this post.&lt;/P&gt;
&lt;P&gt;I haven't worked around this problem as am clueless for the approach. Some insights or workaround this is appreciated.&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is the second time you have asked this question &lt;STRONG&gt;without&lt;/STRONG&gt; providing what the target goals are. There is not really any way to answer this without knowing what the goals are or how the data with the goals is organized.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have a SAS data set to work from yet?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 14:28:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494493#M130320</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-11T14:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494497#M130321</link>
      <description>&lt;P&gt;Mr Ballardw,&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the second time I am mentioning you, I have attached the sample dataset file named "Sales.csv" with the original post in initial itself. What kind of dataset would you prefer to have, an excel file or an image?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 14:49:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494497#M130321</guid>
      <dc:creator>mdhtrivedi</dc:creator>
      <dc:date>2018-09-11T14:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494550#M130338</link>
      <description>&lt;P&gt;He wants a data set you can copy and run as a data step, pasted into the forum, not as an attachment. Human nature, the more steps you make us take to help you, the less likely you're going to get help. Vague questions get vague answers and as soon you require a specific type of solution (arrays) it's likely homework, which means I'm less inclined to help without the poster showing some significant effort (that's a personal rule).&amp;nbsp;Not a criticism or anything, just some feedback on how your posts are likely being received.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions on how to create a data step are found here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/221100"&gt;@mdhtrivedi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Mr Ballardw,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the second time I am mentioning you, I have attached the sample dataset file named "Sales.csv" with the original post in initial itself. What kind of dataset would you prefer to have, an excel file or an image?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 17:12:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494550#M130338</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-11T17:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494552#M130339</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/221100"&gt;@mdhtrivedi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Mr Ballardw,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the second time I am mentioning you, I have attached the sample dataset file named "Sales.csv" with the original post in initial itself. What kind of dataset would you prefer to have, an excel file or an image?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your example data is a&amp;nbsp;matrix of season and values with column headings of Product_1, which from the tab name indicates these are some sort of sales number. If those are "targets" then there is no sales data to compare with the targets.&lt;/P&gt;
&lt;PRE&gt;Region Product_1 Product_2 Product_3 Product_4
North   8600     9300      8500      11000
East    9500     9500      8100      9800
West    9260     8900      9200      9300&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If those are sales values then there is not a&amp;nbsp;"target value" provided.&lt;/P&gt;
&lt;P&gt;You ask in the title and the question: "percentage of targets achieved". We do not know 1) what any target value is so we cannot 2) determine which if any target was "achieved" whatever that might be, assumption likely is that the product sale/region combination is equal to or larger than a target value.&amp;nbsp;3) We don't know if the "target" is a number of units sold or currency value, 4)&amp;nbsp;we don't know if the values above are units sold or currency value&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;To calculate a "percentage of targets achieved" you need to know 1) the number of targets achieved and 2) the total number of targets, which above implies there are 12. Then you would calculate percentage by dividing the number of targets achieved by the total number of targets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you have only provided &lt;STRONG&gt;half the data&lt;/STRONG&gt; for the question provided.&lt;/P&gt;
&lt;P&gt;If I am supposed to figure out if the North region Product_1 sales of 8600 achieved its target, what value is&amp;nbsp;8600 compared to for determining if it was met? You need a complete additional matrix of the &lt;STRONG&gt;target&lt;/STRONG&gt; values to answer the question. Or if the target was supposed to be exactly the same for each region/product combination (unlikely but possible for a school exercise) then we need that value.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 17:15:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494552#M130339</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-11T17:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494554#M130340</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;It is stated in the original post. IF/THEN statements are simpler here though IMO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;The target sales across regions(North, East, West), of four products() is given as (9450,9100,8550,9700)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 11 Sep 2018 17:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494554#M130340</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-11T17:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494567#M130346</link>
      <description>Okay. I will improve my details and explanation more descriptive and clear.&lt;BR /&gt;Thanks for honest feedback.&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Sep 2018 17:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494567#M130346</guid>
      <dc:creator>mdhtrivedi</dc:creator>
      <dc:date>2018-09-11T17:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494573#M130348</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;It is stated in the original post. IF/THEN statements are simpler here though IMO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;The target sales across regions(North, East, West), of four products() is given as (9450,9100,8550,9700)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So I missed that.&amp;nbsp; I find it poorly stated.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 17:47:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494573#M130348</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-11T17:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494604#M130364</link>
      <description>&lt;P&gt;Since you're new, we'll take it easy but please do try and implement changes when you post a new question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Here's how I'd do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*create sample data;
data have;
infile cards dlm=',' dsd;
input Region $ Product_1-Product_4;
cards;
North,8600,9300,8500,11000
East,9500,9500,8100,9800
West,9260,8900,9200,9300
North,8600,4500,8500,23000
East,9500,9500,8100,9800
West,9260,2200,9200,400
North,8600,1300,8500,5000
East,9500,1200,8100,9800
West,9260,8900,9200,200
;;;;
run;

*transpose to a long format and create some flags for some targets;
data long;
set have;

array prod(4) product_1-product_4;
array targets (4) _temporary_ (9450, 9100, 8550, 9700);
flag=0;
do Product=1 to dim(prod);
    Value = prod(product);
    flag = value &amp;gt; targets(product);
    output;
end;

run;

*output;
proc means data=long n mean stackods;
class region product;
types region product region*product;
var flag;
ods output summary=answer;
run;

title 'Target reached for Product, Region and Product*Region';
proc print data=answer;
    format mean percent12.1;
run;

*if you want a displayed report;
proc tabulate data=long;
class product region;
var flag;
table (region all)*(product all), flag*mean*f=percent12.1;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 18:52:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494604#M130364</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-11T18:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494612#M130368</link>
      <description>&lt;P&gt;Hereby I explain my problem clearly. Below is the dataset given:-&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Region&lt;/TD&gt;&lt;TD&gt;Product_1&lt;/TD&gt;&lt;TD&gt;Product_2&lt;/TD&gt;&lt;TD&gt;Product_3&lt;/TD&gt;&lt;TD&gt;Product_4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;North&lt;/TD&gt;&lt;TD&gt;8600&lt;/TD&gt;&lt;TD&gt;9300&lt;/TD&gt;&lt;TD&gt;8500&lt;/TD&gt;&lt;TD&gt;11000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;East&lt;/TD&gt;&lt;TD&gt;9500&lt;/TD&gt;&lt;TD&gt;9500&lt;/TD&gt;&lt;TD&gt;8100&lt;/TD&gt;&lt;TD&gt;9800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;West&lt;/TD&gt;&lt;TD&gt;9260&lt;/TD&gt;&lt;TD&gt;8900&lt;/TD&gt;&lt;TD&gt;9200&lt;/TD&gt;&lt;TD&gt;9300&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;I am importing the data file by following code snippet:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC IMPORT OUT=Sales
DATAFILE= "/home/folder/Sales.csv"
DBMS=CSV REPLACE ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now I am doing summation of each products sales across different regions by following code:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc Means Data = Sales Sum;
Var Product_1 - Product_4;
Run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am given targets for each product and now I have got sum of each products sales, that looks like below:-&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Region&lt;/TD&gt;&lt;TD&gt;Product_1&lt;/TD&gt;&lt;TD&gt;Product_2&lt;/TD&gt;&lt;TD&gt;Product_3&lt;/TD&gt;&lt;TD&gt;Product_4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;North&lt;/TD&gt;&lt;TD&gt;8600&lt;/TD&gt;&lt;TD&gt;9300&lt;/TD&gt;&lt;TD&gt;8500&lt;/TD&gt;&lt;TD&gt;11000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;East&lt;/TD&gt;&lt;TD&gt;9500&lt;/TD&gt;&lt;TD&gt;9500&lt;/TD&gt;&lt;TD&gt;8100&lt;/TD&gt;&lt;TD&gt;9800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;West&lt;/TD&gt;&lt;TD&gt;9260&lt;/TD&gt;&lt;TD&gt;8900&lt;/TD&gt;&lt;TD&gt;9200&lt;/TD&gt;&lt;TD&gt;9300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Sum&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;27360&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;27700&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;25800&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;30100&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Target&lt;/TD&gt;&lt;TD&gt;9450&lt;/TD&gt;&lt;TD&gt;9100&lt;/TD&gt;&lt;TD&gt;8550&lt;/TD&gt;&lt;TD&gt;9700&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now my intention is to calculate percentage of targets achieved of each product across all regions whose calculation looks like below:-&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Region&lt;/TD&gt;&lt;TD&gt;Product_1&lt;/TD&gt;&lt;TD&gt;Product_2&lt;/TD&gt;&lt;TD&gt;Product_3&lt;/TD&gt;&lt;TD&gt;Product_4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;North&lt;/TD&gt;&lt;TD&gt;8600&lt;/TD&gt;&lt;TD&gt;9300&lt;/TD&gt;&lt;TD&gt;8500&lt;/TD&gt;&lt;TD&gt;11000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;East&lt;/TD&gt;&lt;TD&gt;9500&lt;/TD&gt;&lt;TD&gt;9500&lt;/TD&gt;&lt;TD&gt;8100&lt;/TD&gt;&lt;TD&gt;9800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;West&lt;/TD&gt;&lt;TD&gt;9260&lt;/TD&gt;&lt;TD&gt;8900&lt;/TD&gt;&lt;TD&gt;9200&lt;/TD&gt;&lt;TD&gt;9300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sum&lt;/TD&gt;&lt;TD&gt;27360&lt;/TD&gt;&lt;TD&gt;27700&lt;/TD&gt;&lt;TD&gt;25800&lt;/TD&gt;&lt;TD&gt;30100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Target&lt;/TD&gt;&lt;TD&gt;9450&lt;/TD&gt;&lt;TD&gt;9100&lt;/TD&gt;&lt;TD&gt;8550&lt;/TD&gt;&lt;TD&gt;9700&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Percentage of targets achieved&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;(9450*100)/27360&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;(9100*100)/27700&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;(8550*100)/25800&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;(9700*100)/30100&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to achieve the calculation of&amp;nbsp;&lt;STRONG&gt;percentage of targets achieved&lt;/STRONG&gt; for each product across the regions in sas.&lt;/P&gt;&lt;P&gt;I could do untill summation but further I want some insights further into this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please feel free to ask if there is any query.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 19:10:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494612#M130368</guid>
      <dc:creator>mdhtrivedi</dc:creator>
      <dc:date>2018-09-11T19:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494614#M130369</link>
      <description>Are you sure that percentage formula is correct? This is why it's so important to post the data. I clearly interpreted this problem significantly differently. &lt;BR /&gt;&lt;BR /&gt;From my solution - look at proc means to summarize the data. And the data step can be modified to calculate the percentage afterwards, similarly. Or you can access the targets at least. Given what I've posted, you should have enough to make an attempt and if you're having issues, post your full code include the data step, like I did at the top of my post. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Sep 2018 19:30:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/494614#M130369</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-11T19:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/496136#M131132</link>
      <description>&lt;P&gt;Hi Reeza,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cross verified with my colleague and your approach and output is right. I was confused with the percentage calculation. Thanks for your help in brief.&lt;/P&gt;&lt;P&gt;Medha&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 07:22:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/496136#M131132</guid>
      <dc:creator>mdhtrivedi</dc:creator>
      <dc:date>2018-09-17T07:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Finding what percentage of targets are achieved using SAS arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/520349#M141076</link>
      <description>&lt;P&gt;Hi, could u please tell what is the final code u used to get the target percentage?&amp;nbsp; I am still not clear.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 13:23:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-what-percentage-of-targets-are-achieved-using-SAS-arrays/m-p/520349#M141076</guid>
      <dc:creator>SAS1234567890</dc:creator>
      <dc:date>2018-12-11T13:23:08Z</dc:date>
    </item>
  </channel>
</rss>

