<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Coverting attribute to decimal and doing math - wrong result - Acumatica Generic Inquiries &amp; Pivot Tables				            </title>
            <link>https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/</link>
            <description>Acumatica User Group Forums</description>
            <language>en-US</language>
            <lastBuildDate>Wed, 17 Jun 2026 02:01:03 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Coverting attribute to decimal and doing math - wrong result</title>
                        <link>https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11136</link>
                        <pubDate>Thu, 18 Jan 2024 15:30:10 +0000</pubDate>
                        <description><![CDATA[@jmck I did actually change the formula to be =(cDec()/100) * cdec() afterwards.  It&#039;s not really &quot;resolved&quot; per se.  Just have to be creative with ...]]></description>
                        <content:encoded><![CDATA[<p>@jmck I did actually change the formula to be =(cDec()/100) * cdec() afterwards.  It's not really "resolved" per se.  Just have to be creative with the solution by dividing by the 100 to get the result I need.    </p>
<p>I was mostly curious why the cDec was converting the decimal to a whole number.</p>
<p> </p>
<p>I did find something on Acumatica's forum though using entry masks.  I have 0.00.  They show using 0.### so maybe changing the mask to #.## would yield the correct result.  Thinking out loud.</p>
<p> </p>
<p>https://community.acumatica.com/reports-and-generic-inquires-115/creating-a-numeric-attribute-18027</p>]]></content:encoded>
						                            <category domain="https://www.augforums.com/forums/acumatica-generic-inquiries/">Acumatica Generic Inquiries &amp; Pivot Tables</category>                        <dc:creator>Travis</dc:creator>
                        <guid isPermaLink="true">https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11136</guid>
                    </item>
				                    <item>
                        <title>RE: Coverting attribute to decimal and doing math - wrong result</title>
                        <link>https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11135</link>
                        <pubDate>Thu, 18 Jan 2024 13:41:38 +0000</pubDate>
                        <description><![CDATA[@travisl Does this mean the &quot;problem&quot; has been resolved?
One of my practices is to layout a formula in a way that makes sense when I read it...
Yours is =(cDec([InventoryItem.SPA_Attribute...]]></description>
                        <content:encoded><![CDATA[<p>@travisl Does this mean the "problem" has been resolved?</p>
<p>One of my practices is to layout a formula in a way that makes sense when I read it...</p>
<p>Yours is =(cDec() * cDec())/100</p>
<p>Mine would be =(cDec()/100) * cdec()</p>
<p>I know it works out the same BUT when I review the formula in the future then I'm more likely to remember what the /100 is for this way.</p>
<p>imho, it's still quit curious to me why cDec is doing this to . I wonder if it has something to do with the original data type?</p>
<p>;-)</p>
<p> </p>]]></content:encoded>
						                            <category domain="https://www.augforums.com/forums/acumatica-generic-inquiries/">Acumatica Generic Inquiries &amp; Pivot Tables</category>                        <dc:creator>James McKinnon</dc:creator>
                        <guid isPermaLink="true">https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11135</guid>
                    </item>
				                    <item>
                        <title>RE: Coverting attribute to decimal and doing math - wrong result</title>
                        <link>https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11134</link>
                        <pubDate>Thu, 18 Jan 2024 13:10:14 +0000</pubDate>
                        <description><![CDATA[@jmck Thanks for the response.  
Here&#039;s the results.  SPA Rate is the attribute and SPA Payment is the cDec.  Interesting that cDec is turning it from 0.50 to 50.  That explains why dividin...]]></description>
                        <content:encoded><![CDATA[<p>@jmck Thanks for the response.  </p>
<p>Here's the results.  SPA Rate is the attribute and SPA Payment is the cDec.  Interesting that cDec is turning it from 0.50 to 50.  That explains why dividing is required.  No odd grouping - there isn't any.  Also I can reconcile each individual line so it's not duplicating or grouping.</p>
3400]]></content:encoded>
						                            <category domain="https://www.augforums.com/forums/acumatica-generic-inquiries/">Acumatica Generic Inquiries &amp; Pivot Tables</category>                        <dc:creator>Travis</dc:creator>
                        <guid isPermaLink="true">https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11134</guid>
                    </item>
				                    <item>
                        <title>RE: Coverting attribute to decimal and doing math - wrong result</title>
                        <link>https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11133</link>
                        <pubDate>Thu, 18 Jan 2024 12:31:00 +0000</pubDate>
                        <description><![CDATA[@travisl hrmm... my gut is telling me it could be a grouping issue...
A general practice of mine is to build a GI that lists each filed on it&#039;s own line within the RESULT GRID which helps c...]]></description>
                        <content:encoded><![CDATA[<p>@travisl hrmm... my gut is telling me it could be a grouping issue...</p>
<p>A general practice of mine is to build a GI that lists each filed on it's own line within the RESULT GRID which helps confirm the intentions or assumptions being made.</p>
<p>Intentions or Assumptions</p>
<ul>
<li><span>SPA_Attributes = 1.00</span></li>
<li><span>ARTran.Qty = 25</span></li>
</ul>
<p><span>...but what if they don't when running through the GI?</span></p>
<p>I'd suggest you add them both into the RESULT GRID as is and using the conversions so...</p>
<ul>
<li><span>SPA_Attributes</span></li>
<li>cDec()</li>
<li>Qty</li>
<li>cDec()</li>
</ul>
<p><span> You might find that...</span></p>
<ul>
<li><span>one of them is 10 times what you thought it should be</span></li>
<li><span>things magically start to work</span></li>
<li>cDec is not having the desired results</li>
</ul>
<p><span>...tough to predict but this should help</span></p>
<p>Either way, my gut is telling me to suggest you...</p>
<ul>
<li>add a unique identifier in the mix to ensure that there's no unexpected grouping going on</li>
<li>double check the grouping</li>
<li>double check the type of join between the tables</li>
</ul>
<p>Welcome to my method of trouble shooting... I do this a lot since I'm accustomed to SQL so, in my head, there seems to be loads of unexpected result with GI's.</p>
<p>Good luck! ;-)</p>]]></content:encoded>
						                            <category domain="https://www.augforums.com/forums/acumatica-generic-inquiries/">Acumatica Generic Inquiries &amp; Pivot Tables</category>                        <dc:creator>James McKinnon</dc:creator>
                        <guid isPermaLink="true">https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11133</guid>
                    </item>
				                    <item>
                        <title>RE: Coverting attribute to decimal and doing math - wrong result</title>
                        <link>https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11131</link>
                        <pubDate>Wed, 17 Jan 2024 18:15:30 +0000</pubDate>
                        <description><![CDATA[@jmck Actually I also have a 0.75 in that value on others.  It simply represents a dollar amount.  The attribute is an attribute I set up for inventory items
So the expected result is 25 * ...]]></description>
                        <content:encoded><![CDATA[<p>@jmck Actually I also have a 0.75 in that value on others.  It simply represents a dollar amount.  The attribute is an attribute I set up for inventory items</p>
<p>So the expected result is 25 * 0.75 = $18.75.  The actual result is $1,875.</p>
<p> </p>
<p>Here is the attribute setup:</p>
3398
<p> </p>
<p>We have it set up as an attribute on a stock items.  My assumption is it should just be stored as 1.00.  @Timrodman may be on to something in that Acumatica may assume it's a percentage.  Not sure why though.</p>]]></content:encoded>
						                            <category domain="https://www.augforums.com/forums/acumatica-generic-inquiries/">Acumatica Generic Inquiries &amp; Pivot Tables</category>                        <dc:creator>Travis</dc:creator>
                        <guid isPermaLink="true">https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11131</guid>
                    </item>
				                    <item>
                        <title>RE: Coverting attribute to decimal and doing math - wrong result</title>
                        <link>https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11129</link>
                        <pubDate>Wed, 17 Jan 2024 17:21:06 +0000</pubDate>
                        <description><![CDATA[I&#039;m not sure what SPA_Attributes represents but maybe it would be easier to evaluate if it didn&#039;t equal 1 and maybe more awkward, so it&#039;s obvious to us if/when it works? Maybe something like...]]></description>
                        <content:encoded><![CDATA[<p>I'm not sure what SPA_Attributes represents but maybe it would be easier to evaluate if it didn't equal 1 and maybe more awkward, so it's obvious to us if/when it works? Maybe something like 0.8 or 1.2 kind of deal?</p>
<p>alternatively... is there any chance there's a many to one relationship without your knowledge, like maybe on of the two field has 100 instances of the value? again, might be easier for this example to have SPA_Attribute not equal 1 which could help lead us down a more appropriate path.</p>
<p> </p>
<p>;-)</p>]]></content:encoded>
						                            <category domain="https://www.augforums.com/forums/acumatica-generic-inquiries/">Acumatica Generic Inquiries &amp; Pivot Tables</category>                        <dc:creator>James McKinnon</dc:creator>
                        <guid isPermaLink="true">https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11129</guid>
                    </item>
				                    <item>
                        <title>RE: Coverting attribute to decimal and doing math - wrong result</title>
                        <link>https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11127</link>
                        <pubDate>Wed, 17 Jan 2024 16:19:59 +0000</pubDate>
                        <description><![CDATA[Is the 1.0 maybe a percentage that&#039;s getting stored as 100?]]></description>
                        <content:encoded><![CDATA[<p>Is the 1.0 maybe a percentage that's getting stored as 100?</p>]]></content:encoded>
						                            <category domain="https://www.augforums.com/forums/acumatica-generic-inquiries/">Acumatica Generic Inquiries &amp; Pivot Tables</category>                        <dc:creator>Tim Rodman</dc:creator>
                        <guid isPermaLink="true">https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11127</guid>
                    </item>
				                    <item>
                        <title>Coverting attribute to decimal and doing math - wrong result</title>
                        <link>https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11119</link>
                        <pubDate>Mon, 15 Jan 2024 12:31:47 +0000</pubDate>
                        <description><![CDATA[I&#039;m having to divide the total by 100 to get the correct value.  Any ideas why this is the case? 
SPA_Attributes = 1.00
ARTran.Qty = 25
Expected results:  25. 
Actual result:  2500 (with...]]></description>
                        <content:encoded><![CDATA[<p>I'm having to divide the total by 100 to get the correct value.  Any ideas why this is the case? </p>
<p>SPA_Attributes = 1.00</p>
<p>ARTran.Qty = 25</p>
<p>Expected results:  25. </p>
<p>Actual result:  2500 (without divide by 100)</p>
<p> </p>
<pre contenteditable="false">=(cDec() * cdec())/100</pre>]]></content:encoded>
						                            <category domain="https://www.augforums.com/forums/acumatica-generic-inquiries/">Acumatica Generic Inquiries &amp; Pivot Tables</category>                        <dc:creator>Travis</dc:creator>
                        <guid isPermaLink="true">https://www.augforums.com/forums/acumatica-generic-inquiries/coverting-attribute-to-decimal-and-doing-math-wrong-result/#post-11119</guid>
                    </item>
							        </channel>
        </rss>
		