Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: multiple variations in an If statement Post Reply Post New Topic
Author Message
spoole
Newbie
Newbie
Avatar

Joined: 11 Nov 2011
Location: United States
Online Status: Offline
Posts: 2
Quote spoole Replybullet Topic: multiple variations in an If statement
     Posted: 16 Nov 2011 at 9:02am
I am trying to create a formula to set Sales tiers in a report based on a group sum field.
if Sum ({oelinhst_sql.sls_amt}, {oehdrhst_sql.ship_to_name})>1000 then "Tier A" or
if Sum ({oelinhst_sql.sls_amt}, {oehdrhst_sql.ship_to_name})<=1000 and Sum ({oelinhst_sql.sls_amt}, {oehdrhst_sql.ship_to_name})>500 then "Tier B" or
if Sum ({oelinhst_sql.sls_amt}, {oehdrhst_sql.ship_to_name})<500 then "Tier C" else "Error"
 
I keep getting various errors with this formula.
Embarrassed
Can someone help me with this formula?
 
thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Nov 2011 at 9:23am
if Sum ({oelinhst_sql.sls_amt}, {oehdrhst_sql.ship_to_name})<500 then "Tier C" ELSE
if Sum ({oelinhst_sql.sls_amt}, {oehdrhst_sql.ship_to_name}) in 501 to 1000 then "Tier B"  ELSE
if Sum ({oelinhst_sql.sls_amt}, {oehdrhst_sql.ship_to_name})>1000 then "Tier A" Else "Error"
 


Edited by DBlank - 16 Nov 2011 at 9:24am
IP IP Logged
spoole
Newbie
Newbie
Avatar

Joined: 11 Nov 2011
Location: United States
Online Status: Offline
Posts: 2
Quote spoole Replybullet Posted: 16 Nov 2011 at 12:22pm
Thanks so much!
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum