Solved

"Percentage Difference" formula needed

Posted on 2014-10-02
4
124 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
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 24

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

705 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now