<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blogging about all things SAS &#187; SPM Formula&#8217;s</title>
	<atom:link href="http://blog.saasinct.com/tag/spm-formulas/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.saasinct.com</link>
	<description>::       Sharing with the world everything we discover about SAS.</description>
	<lastBuildDate>Wed, 01 Sep 2010 06:56:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SPM Formulas &#8211; Divide by Zero errors</title>
		<link>http://blog.saasinct.com/2009/04/27/spm-formulas-divide-by-zero-errors/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spm-formulas-divide-by-zero-errors</link>
		<comments>http://blog.saasinct.com/2009/04/27/spm-formulas-divide-by-zero-errors/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 09:47:24 +0000</pubDate>
		<dc:creator>Shane Gibson</dc:creator>
				<category><![CDATA[SAS 9.1]]></category>
		<category><![CDATA[SPM]]></category>
		<category><![CDATA[SPM Formula's]]></category>

		<guid isPermaLink="false">http://blog.sasinct.com/2009/04/27/spm-formulas-divide-by-zero-errors/</guid>
		<description><![CDATA[Been struggling with how to trap a divide by zero issue&#8217;s in SPM formulas, so we don&#8217;t show the dreaded NULL value. With a little help from SAS support, finally worked out what I need is: IF(([ELE=current('ELE')][COL='xxxxxx'][PER=current('PER')]/[ELE=current('ELE')][COL='xxxxxx1'][PER=current('PER')]) = _ERROR_ , 0,([ELE=current('ELE')][COL='xxxxxx'][PER=current('PER')]/[ELE=current('ELE')][COL='xxxxxx1'][PER=current('PER')]/100)) So basically if the dividing calculation results in an error (i.e one of the [...]]]></description>
			<content:encoded><![CDATA[<p>Been struggling with how to trap a divide by zero issue&#8217;s in SPM formulas, so we don&#8217;t show the dreaded NULL value.</p>
<p>With a little help from SAS support, finally worked out what I need is:</p>
<p>IF(([ELE=current('ELE')][COL='xxxxxx'][PER=current('PER')]/[ELE=current('ELE')][COL='xxxxxx1'][PER=current('PER')]) = _ERROR_ , 0,([ELE=current('ELE')][COL='xxxxxx'][PER=current('PER')]/[ELE=current('ELE')][COL='xxxxxx1'][PER=current('PER')]/100))</p>
<p>So basically if the dividing calculation results in an error (i.e one of the dividers is 0 or missing) then put a 0, otherwise do the calc.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.saasinct.com/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.saasinct.com/2009/04/27/spm-formulas-divide-by-zero-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
