Solved

Calculating a discount in Crystal Formula

Posted on 2015-01-20
4
111 Views
Last Modified: 2015-01-20
I have a price field that I want to use minus a discount

{PRICING.BVRTLPRICE01} - {?Discount %}

{?Discount %} is my parameter which can be from 1-100

This is what I need
If {PRICING.BVRTLPRICE01} = 0.00 then 0.00 else {PRICING.BVRTLPRICE01} - {?Discount %}
0
Comment
Question by:Gerhardpet
  • 2
  • 2
4 Comments
 
LVL 22

Expert Comment

by:Ido Millet
ID: 40560292
{PRICING.BVRTLPRICE01} * (1 - {?Discount %})
0
 
LVL 1

Author Comment

by:Gerhardpet
ID: 40560367
The formula does not work.

Here is a sample I did
60 * (1-50) = 2940 but that should be 30

60 - 50% = 30
0
 
LVL 22

Accepted Solution

by:
Ido Millet earned 500 total points
ID: 40560418
That means the % is not stored as %.

So use
{PRICING.BVRTLPRICE01} * (1 - {?Discount %}/100)
0
 
LVL 1

Author Comment

by:Gerhardpet
ID: 40560452
That worked. Thanks Ido!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

This article describes some very basic things about SQL Server filegroups.
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

912 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

20 Experts available now in Live!

Get 1:1 Help Now