Link to home
Start Free TrialLog in
Avatar of evend
evend

asked on

I have a crystal percentage formula issue

I want the this formula to return a %.  Like 14%,  It comes back now 0.14%

if Sum ({@Cashless}, {points_of_sale.code}) = 0 then
    0
else

if Sum ({Vend_Visits.total_revenue}, {points_of_sale.code}) = 0 then
    0
else

Sum ({@Cashless}, {points_of_sale.code})/Sum ({Vend_Visits.total_revenue}, {points_of_sale.code})
Avatar of 5teveo
5teveo
Flag of United States of America image

Try this syntax... here is a sample of syntax

Sum({orders.AMOUNT}, {orders.DATE}, "monthly") % Sum({orders.AMOUNT })

Groups values in the Amount field by month, and calculates the sum of the values for each month group as a percentage of the sum of the values for the entire report.
ASKER CERTIFIED SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of evend
evend

ASKER

Thanks!  Multipying by 100 was easy.
You're welcome.

 But, to be fair, 5teveo probably should have gotten some of the points.  His basic suggestion to use the % operator was valid, although his use of different fields in his example formula, and then explaining what that formula was doing, was kind of confusing (at least to me).  So, it may be something of a gray area.  But he did have the % operator in there.

 If you like, you can use the "Request Attention" link to ask to have the question re-opened, and then split the points between us.

 James