<?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 extract column names and then apply arithmetic function if all the criterias are met in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/extract-column-names-and-then-apply-arithmetic-function-if-all/m-p/466543#M30264</link>
    <description>&lt;P&gt;My data set looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;10001_t&amp;nbsp; &amp;nbsp; &amp;nbsp; 10001_C1&amp;nbsp; &amp;nbsp;10001_C2&amp;nbsp; 10001_C3&amp;nbsp; 10001_C4&amp;nbsp; &amp;nbsp; 10002_t&amp;nbsp; &amp;nbsp; &amp;nbsp; 10002_B1&amp;nbsp; &amp;nbsp;10001_B2&amp;nbsp; &amp;nbsp; 10001_B3&lt;/P&gt;&lt;P&gt;value1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;value3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;value7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value9&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value11&amp;nbsp; &amp;nbsp; &amp;nbsp; value12&amp;nbsp; &amp;nbsp; &amp;nbsp; value12&amp;nbsp; &amp;nbsp; &amp;nbsp; value14&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value15&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;valu16&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;value17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value18&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value19&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value20&amp;nbsp; &amp;nbsp; &amp;nbsp; value21&amp;nbsp; &amp;nbsp; &amp;nbsp; value22&amp;nbsp; &amp;nbsp; &amp;nbsp; value23&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value24&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;valu25&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value26&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value27&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value28&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value29&amp;nbsp; &amp;nbsp; &amp;nbsp; value30&amp;nbsp; &amp;nbsp; &amp;nbsp; value31&amp;nbsp; &amp;nbsp; &amp;nbsp; value32&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value33&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;valu34&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value35&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value36&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now, I want to&amp;nbsp; divide all the values in 10001_C1 with values in 10001_t , similarly all values in column 10001_C2 will be divided by 10001_t ( which is like the total for that 'C' group, here 10001_C1 is considered as C group) . Division will take place till 10001_C4 column after that the denominator will change ( i.e earlier it was value2/value1 , value3/value1, value4/value1, value5,value1). Now everytime the column name had 't' at the end the denominator will change so when 10002_t comes the denominator will be value_6, so the new table will have percent value in 10002_B1 column as value7/value6, the column 10001_B2 will have vlaue8/value6 and 10001_B3 will have value9/value6.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know its a bit confusing but it's all I have and would really appreciate if someone can suggest&amp;nbsp; a way to solve it. I don't mind if we divide in same table or create a new one. Also the data set is quite big so the code has be dynamic. will really appreciate any help I can get.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 31 May 2018 16:33:02 GMT</pubDate>
    <dc:creator>adityakumar1507</dc:creator>
    <dc:date>2018-05-31T16:33:02Z</dc:date>
    <item>
      <title>extract column names and then apply arithmetic function if all the criterias are met</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/extract-column-names-and-then-apply-arithmetic-function-if-all/m-p/466543#M30264</link>
      <description>&lt;P&gt;My data set looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;10001_t&amp;nbsp; &amp;nbsp; &amp;nbsp; 10001_C1&amp;nbsp; &amp;nbsp;10001_C2&amp;nbsp; 10001_C3&amp;nbsp; 10001_C4&amp;nbsp; &amp;nbsp; 10002_t&amp;nbsp; &amp;nbsp; &amp;nbsp; 10002_B1&amp;nbsp; &amp;nbsp;10001_B2&amp;nbsp; &amp;nbsp; 10001_B3&lt;/P&gt;&lt;P&gt;value1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;value3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;value7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value9&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value11&amp;nbsp; &amp;nbsp; &amp;nbsp; value12&amp;nbsp; &amp;nbsp; &amp;nbsp; value12&amp;nbsp; &amp;nbsp; &amp;nbsp; value14&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value15&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;valu16&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;value17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value18&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value19&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value20&amp;nbsp; &amp;nbsp; &amp;nbsp; value21&amp;nbsp; &amp;nbsp; &amp;nbsp; value22&amp;nbsp; &amp;nbsp; &amp;nbsp; value23&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value24&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;valu25&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value26&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value27&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value28&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value29&amp;nbsp; &amp;nbsp; &amp;nbsp; value30&amp;nbsp; &amp;nbsp; &amp;nbsp; value31&amp;nbsp; &amp;nbsp; &amp;nbsp; value32&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value33&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;valu34&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value35&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value36&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now, I want to&amp;nbsp; divide all the values in 10001_C1 with values in 10001_t , similarly all values in column 10001_C2 will be divided by 10001_t ( which is like the total for that 'C' group, here 10001_C1 is considered as C group) . Division will take place till 10001_C4 column after that the denominator will change ( i.e earlier it was value2/value1 , value3/value1, value4/value1, value5,value1). Now everytime the column name had 't' at the end the denominator will change so when 10002_t comes the denominator will be value_6, so the new table will have percent value in 10002_B1 column as value7/value6, the column 10001_B2 will have vlaue8/value6 and 10001_B3 will have value9/value6.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know its a bit confusing but it's all I have and would really appreciate if someone can suggest&amp;nbsp; a way to solve it. I don't mind if we divide in same table or create a new one. Also the data set is quite big so the code has be dynamic. will really appreciate any help I can get.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 16:33:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/extract-column-names-and-then-apply-arithmetic-function-if-all/m-p/466543#M30264</guid>
      <dc:creator>adityakumar1507</dc:creator>
      <dc:date>2018-05-31T16:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: extract column names and then apply arithmetic function if all the criterias are met</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/extract-column-names-and-then-apply-arithmetic-function-if-all/m-p/466550#M30265</link>
      <description>&lt;P&gt;Hi, Thank you for your question. May i request you to provide sample data that would help to have something to work with and test please?&lt;/P&gt;&lt;P&gt;If you could please provide the community with a sample input data and a sample of expected output data so that you and the community can test/validate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 16:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/extract-column-names-and-then-apply-arithmetic-function-if-all/m-p/466550#M30265</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-05-31T16:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: extract column names and then apply arithmetic function if all the criterias are met</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/extract-column-names-and-then-apply-arithmetic-function-if-all/m-p/466553#M30266</link>
      <description>&lt;P&gt;Since your column names by default are not valid SAS variables show us what the variable names in your SAS data set actually are.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pick a couple variables, show us actual values and what the actual desired output for those values looks like. Real actual numeric non-trivial (not all 1 or 2) numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 16:42:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/extract-column-names-and-then-apply-arithmetic-function-if-all/m-p/466553#M30266</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-31T16:42:07Z</dc:date>
    </item>
  </channel>
</rss>

