Solved

"Percentage Difference" formula needed

Posted on 2014-10-02
4
136 Views
Last Modified: 2014-10-08
I have two currency fields, Current YTD and Previous YTD.

I need a formula that shows the percentage increase or decrease.  I've tried a few things but I'm getting Division by 0 errors.  Either value can be "0".

I need something to display 50, 100, or -50, -100, etc, etc

I'm braindead - can any of you help?

Thanks in advance!


Steve
0
Comment
Question by:SStroz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 4

Expert Comment

by:carloselfaite
ID: 40358747
I think you could be a litle more clear explaining some of your actual code in order to get the right answer.
0
 
LVL 25

Expert Comment

by:chaau
ID: 40358748
you need to use "if then else" syntax to check if the divisor is zero, like this:
If {Current YTD} ={Previous YTD} then 0 else ({Current YTD} - {Previous YTD}) / {Current YTD} * 100

Open in new window

0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40359304
Actually the formula needs to test the divisor.  Also you are probably looking for the percentage increase/decrease over the previous year

Try this

If {PreviousYear} = 0 then 0 else ({CurrentYear} - {PreviousYear}) / {PreviousYear} * 100

mlmcc
0
 
LVL 7

Author Closing Comment

by:SStroz
ID: 40369796
Thanks Michael!!!


Steve
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question