function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
xsamxsam 

Help with formula field

I need to creat a formula for the following logic. 

 

March to August discount on Indoor product category

september to feburary discount on outdoor product category

more than or equals to $250 spend discount 10%

more than or equals to $500 spend discount 15%

 

I have "product"object and "indoor,outdoor" picklist field. 

 

 

Thank you 

Advanz Knowledge SystemsAdvanz Knowledge Systems

Hi,

 

We can give IF condition for this type scenario.

 

For eg:

 

IF(ISBLANK(BillingState), "None",
IF(CONTAINS("AK:AZ:CA:HA:NV:NM:OR:UT:WA", BillingState), "West",
IF(CONTAINS("CO:ID:MT:KS:OK:TX:WY", BillingState), "Central",
IF(CONTAINS("CT:ME:MA:NH:NY:PA:RI:VT", BillingState), "East",
IF(CONTAINS("AL:AR:DC:DE:FL:GA:KY:LA:MD:MS:NC:NJ:SC:TN:VA:WV", BillingState), "South",
IF(CONTAINS("IL:IN:IA:MI:MN:MO:NE:ND:OH:SD:WI", BillingState), "North", "Other"))))))

xsamxsam

Great Help!!! I tried figuring out using "&&" and "or" operators with if statement. I will try all of them and check what works the best. thankyou again . 

sandeep@Salesforcesandeep@Salesforce

Let say Sale is field which shows amount of shopping. 

 

so formula would be like this

 

IF
(AND(MONTH(TODAY) >= 3 , MONTH(TODAY) <=6 , SALE > 250 ) ,
10 ,
IF(AND(OR(AND(MONTH(TODAY) >= 7 , MONTH(TODAY) <=12) , AND((MONTH(TODAY) >= 1 , MONTH(TODAY) <=2))) , SALE > 500) , 15,0)
)