"Percentage Difference" formula needed

Posted on 2014-10-02
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!

Question by:SStroz
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

Expert Comment

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

Expert Comment

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

LVL 101

Accepted Solution

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


Author Closing Comment

ID: 40369796
Thanks Michael!!!


Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : All lightning effects with instructions : http://www.mediaf…

631 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