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_revenu e}, {points_of_sale.code}) = 0 then
0
else
Sum ({@Cashless}, {points_of_sale.code})/Sum ({Vend_Visits.total_revenu e}, {points_of_sale.code})
if Sum ({@Cashless}, {points_of_sale.code}) = 0 then
0
else
if Sum ({Vend_Visits.total_revenu
0
else
Sum ({@Cashless}, {points_of_sale.code})/Sum
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
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.