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
Solved

How do I write a percentage formula in BO

Posted on 2011-02-11
1
2,604 Views
Last Modified: 2013-11-16
I created 3 measures to display a summary in vertical table:

Count of Complete
Count of Incomplete
Count of  Learners

The details are below the summary table. There is a section break on Cost Center.

My Percentage formula is:
=Percentage([Count of Complete (PTD)]/[Count of Learners (PTD)])

The results returned is "1" for every Cost Center.

My previous formula:  
=Count([Learner ID]) Where([Sub-Qual Status]="Complete")/Count([Learner ID])*100+"%"
worked correctly, but did not display 0% for nulls.

How do write the correct percentage formula that will display the correct percentage per cost center, display "%" and display "0" in the column, if null?
0
Comment
Question by:KnightKreepa
1 Comment
 
LVL 34

Accepted Solution

by:
James0628 earned 500 total points
ID: 34878079
It's hard to say what might be wrong with the first formula.  There could be a problem with one or more of your "Count of" measures.  I'm not familiar with the Percentage function.  BO 6.5 doesn't seem to have that.  There's a Percentile function, but that's something else.

 As for the old formula, I'm not sure what nulls you're referring to, but if the problem is that Count([Learner ID]) is null (that _would_ keep the formula from producing a result), you may just need to add an IsNull test.  Maybe something like:

=If IsNull (Count([Learner ID])) then 0+"%" Else Count([Learner ID]) Where([Sub-Qual Status]="Complete")/Count([Learner ID])*100+"%"


 FWIW, you can also leave off the '+"%"' and let the formula produce a numeric result, and then format the cell as a percentage.  If you do that, you don't need to multiply the result by 100.  The percentage format will take care of that.

 James
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

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 …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

860 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