• Chris McKaughan
  • NEWBIE
  • 30 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 7
    Replies
Hello,

I'm trying to write a formula to detremine a price by using 3 criteria -
1. Size (5 different sizes)
2. Tier (2 Pricing Tiers)
3. Days (Number of days - 2-6)

I'm getting the error "Incorrect number of parameters for function 'CASE()'. Expected 4, received 3"

Here's what I've got so far:

CASE(Size_Code__c,
"S",
CASE(Tier__c, 4,
CASE(
Days__c, 2, 985.6,
Days__c, 3, 1,285.16,
Days__c, 4, 1,539.68,
Days__c, 5, 1,779.28,
Days__c, 6, 2,004.00,
Days__c, 7, 2,213.72,
0)),
CASE(Tier__c, 5,
CASE(
Days__c, 2, 1,110.40,
Days__c, 3, 1,466.04,
Days__c, 4, 1,768.40,
Days__c, 5, 2,052.92,
Days__c, 6, 2,319.68,
Days__c, 7, 2,568.72,
0)),
"M",
CASE(Tier__c, 4,
CASE(
Days__c, 2, 985.6,
Days__c, 3, 1,285.16,
Days__c, 4, 1,539.68,
Days__c, 5, 1,779.28,
Days__c, 6, 2,004.00,
Days__c, 7, 2,213.72,
0)),
CASE(Tier__c, 5,
CASE(
Days__c, 2, 1,110.40,
Days__c, 3, 1,466.04,
Days__c, 4, 1,768.40,
Days__c, 5, 2,052.92,
Days__c, 6, 2,319.68,
Days__c, 7, 2,568.72,
0))
)

Any help would be appreciated
Hello,

So I have a workflow rule that runs fine when the record is edited but will not run at all when it is created. The criteria is that it runs when the record id is not equal to NULL.

User-added image

The field update formula is:

CASE(Size_Code__c,
"S", CASE(Tier__c, 
             1, 595,
             2,655,
             3, 945,
             0),
"M", CASE(Tier__c, 
             1, 835,
             2,835,
             3, 1405,
             0),
"L", CASE(Tier__c, 
             1, 1125,
             2,1305,
             3, 2025,
             NULL),
"XL", CASE(Tier__c, 
             1, 1555,
             2,1835,
             3, 2910,
             0),
"XXL", CASE(Tier__c, 
             1, 2225,
             2,2385,
             3, 4525,
             0),
0)

Any thoughs would be appreciated!

Chris
Hello,

I'm trying to set a currency field with a price based on a size code text field and a pricing tier number field. Can't seem to get the syntax right. Any thoughts?

Thanks,
Chris

IF(AND( Size_Code__c= "S"), Tier__c= 1, 595,
IF(AND( Size_Code__c= "S"), Tier__c= 2, 655,
IF(AND( Size_Code__c= "S"), Tier__c= 3, 945,
IF(AND( Size_Code__c= "M"), Tier__c= 1, 835,
IF(AND( Size_Code__c= "M"), Tier__c= 2, 945,
IF(AND( Size_Code__c= "M"), Tier__c= 3, 1405,
IF(AND( Size_Code__c= "L"), Tier__c= 1, 1125,
IF(AND( Size_Code__c= "L"), Tier__c= 2, 1305,
IF(AND( Size_Code__c= "L"), Tier__c= 3, 2025,
IF(AND( Size_Code__c= "XL"), Tier__c= 1, 1555,
IF(AND( Size_Code__c= "XL"), Tier__c= 2, 1835,
IF(AND( Size_Code__c= "XL"), Tier__c= 3, 2910,
IF(AND( Size_Code__c= "XXL"), Tier__c= 1, 2225,
IF(AND( Size_Code__c= "XXL"), Tier__c= 2, 2385,
IF(AND( Size_Code__c= "XXL"), Tier__c= 3, 4525,
0)))))))))))))))
Hello,

I'm an noob and I'm trying to write a formula that compares a picklist value and a formula result and will enter a number (I need to do math in future formulas so can't use text). This is what I have:

IF(AND(ISPICKVAL( Size__c , "S"), Tier__c= "Tier 1"), 675,
IF(AND(ISPICKVAL( Size__c , "S"), Tier__c= "Tier 2"), 695,
IF(AND(ISPICKVAL( Size__c , "S"), Tier__c= "Tier 3"), 725,
Tier__c)))

Getting the following error:

Incorrect parameter type for function 'IF()'. Expected Number, received Text (Related field: Formula)

If I change the field type to Text and add quotes around the numbers it works but I really need it to be a number.

Any help would be greatly appreciated!!!!



Any help would be appreciated.
 
Hello,

I'm trying to write a formula to detremine a price by using 3 criteria -
1. Size (5 different sizes)
2. Tier (2 Pricing Tiers)
3. Days (Number of days - 2-6)

I'm getting the error "Incorrect number of parameters for function 'CASE()'. Expected 4, received 3"

Here's what I've got so far:

CASE(Size_Code__c,
"S",
CASE(Tier__c, 4,
CASE(
Days__c, 2, 985.6,
Days__c, 3, 1,285.16,
Days__c, 4, 1,539.68,
Days__c, 5, 1,779.28,
Days__c, 6, 2,004.00,
Days__c, 7, 2,213.72,
0)),
CASE(Tier__c, 5,
CASE(
Days__c, 2, 1,110.40,
Days__c, 3, 1,466.04,
Days__c, 4, 1,768.40,
Days__c, 5, 2,052.92,
Days__c, 6, 2,319.68,
Days__c, 7, 2,568.72,
0)),
"M",
CASE(Tier__c, 4,
CASE(
Days__c, 2, 985.6,
Days__c, 3, 1,285.16,
Days__c, 4, 1,539.68,
Days__c, 5, 1,779.28,
Days__c, 6, 2,004.00,
Days__c, 7, 2,213.72,
0)),
CASE(Tier__c, 5,
CASE(
Days__c, 2, 1,110.40,
Days__c, 3, 1,466.04,
Days__c, 4, 1,768.40,
Days__c, 5, 2,052.92,
Days__c, 6, 2,319.68,
Days__c, 7, 2,568.72,
0))
)

Any help would be appreciated
Hello,

So I have a workflow rule that runs fine when the record is edited but will not run at all when it is created. The criteria is that it runs when the record id is not equal to NULL.

User-added image

The field update formula is:

CASE(Size_Code__c,
"S", CASE(Tier__c, 
             1, 595,
             2,655,
             3, 945,
             0),
"M", CASE(Tier__c, 
             1, 835,
             2,835,
             3, 1405,
             0),
"L", CASE(Tier__c, 
             1, 1125,
             2,1305,
             3, 2025,
             NULL),
"XL", CASE(Tier__c, 
             1, 1555,
             2,1835,
             3, 2910,
             0),
"XXL", CASE(Tier__c, 
             1, 2225,
             2,2385,
             3, 4525,
             0),
0)

Any thoughs would be appreciated!

Chris
Hello,

I'm trying to set a currency field with a price based on a size code text field and a pricing tier number field. Can't seem to get the syntax right. Any thoughts?

Thanks,
Chris

IF(AND( Size_Code__c= "S"), Tier__c= 1, 595,
IF(AND( Size_Code__c= "S"), Tier__c= 2, 655,
IF(AND( Size_Code__c= "S"), Tier__c= 3, 945,
IF(AND( Size_Code__c= "M"), Tier__c= 1, 835,
IF(AND( Size_Code__c= "M"), Tier__c= 2, 945,
IF(AND( Size_Code__c= "M"), Tier__c= 3, 1405,
IF(AND( Size_Code__c= "L"), Tier__c= 1, 1125,
IF(AND( Size_Code__c= "L"), Tier__c= 2, 1305,
IF(AND( Size_Code__c= "L"), Tier__c= 3, 2025,
IF(AND( Size_Code__c= "XL"), Tier__c= 1, 1555,
IF(AND( Size_Code__c= "XL"), Tier__c= 2, 1835,
IF(AND( Size_Code__c= "XL"), Tier__c= 3, 2910,
IF(AND( Size_Code__c= "XXL"), Tier__c= 1, 2225,
IF(AND( Size_Code__c= "XXL"), Tier__c= 2, 2385,
IF(AND( Size_Code__c= "XXL"), Tier__c= 3, 4525,
0)))))))))))))))
Hello,

I'm an noob and I'm trying to write a formula that compares a picklist value and a formula result and will enter a number (I need to do math in future formulas so can't use text). This is what I have:

IF(AND(ISPICKVAL( Size__c , "S"), Tier__c= "Tier 1"), 675,
IF(AND(ISPICKVAL( Size__c , "S"), Tier__c= "Tier 2"), 695,
IF(AND(ISPICKVAL( Size__c , "S"), Tier__c= "Tier 3"), 725,
Tier__c)))

Getting the following error:

Incorrect parameter type for function 'IF()'. Expected Number, received Text (Related field: Formula)

If I change the field type to Text and add quotes around the numbers it works but I really need it to be a number.

Any help would be greatly appreciated!!!!



Any help would be appreciated.