Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 8.5 Formula Question 1

Status
Not open for further replies.

waugh

MIS
Aug 29, 2002
8
0
0
US
Here's what I am trying to do. A customer has items that range in retail price. An example is:
Item 1 - $4.95
Item 2 - $5.95
Item 3 - $6.95
Item 4 - $7.95

I am using DISTINCTCOUNT({db.Price}) to get a value of 4, the 4 different price points. Now I want to get a count of price points greater than say, $6.00. I can't figure out the formula.

I've tried DISTINCTCOUNT({db.Price}) > 6 however it returns true or false, not a value such as in this example, would be 2.

What do I need to do? Thanks in advance for your help.
 
create a formula that shows the amount only if it is grater than your price point ie

if {db.Price}>=6
then {db.Price}
else 0

then display o formula that is
if minimum({@aboveformula})=0 //assumes no negative prices
then distinctcount({@aboveformula})-1
else distinctcount({@aboveformula})


if all you needed was a count vs distinctcount you could sum this formula

if {db.Price}>=6
then 1
else 0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top