Trying to create new calculated field

I am trying to create a new calculated field that involves a parameter, the parameter is called TaxStatus and data type is string with static values Subject to AMT, Tax Exempt, and Taxable. I attempted to create a calculated field called selected_tax_status_amount all the columns are named correctly and Total Volume is a column that was renamed.
ifelse(

${TaxStatus} = “Taxable”,

ifelse(

({srs_mstr_fdrl_txbl_flag} = 1) OR ({srs_mstr_st_txbl_flag} = 1),

{Total Volume},

0.0

),

ifelse(

${TaxStatus} = "Tax Exempt",

ifelse(

  ({srs_mstr_fdrl_txbl_flag} = 0) AND ({srs_mstr_st_txbl_flag} = 0),

  {Total Volume},

  0.0

),

ifelse(

  ({srs_mstr_fdrl_alt_min_tax_flag} = 1) OR ({srs_mstr_st_alt_min_tax_flag} = 1),

  {Total Volume},

  0.0

)

)

)

error i am getting: Expression {{argumentName}} for function {{functionName}} has incorrect argument type {{incorrectArgumentType}}. Function syntax expects {{functionSignature}}.

ifelse(
  ${TaxStatus} = "Taxable",
  ifelse(
    ({srs_mstr_fdrl_txbl_flag} = 1) OR ({srs_mstr_st_txbl_flag} = 1),
    {Total Volume},
    0.0
  ),
  ifelse(
    ${TaxStatus} = "Tax Exempt",
    ifelse(
      ({srs_mstr_fdrl_txbl_flag} = 0) AND ({srs_mstr_st_txbl_flag} = 0),
      {Total Volume},
      0.0
    ),
    ifelse(
      ({srs_mstr_fdrl_alt_min_tax_flag} = 1) OR ({srs_mstr_st_alt_min_tax_flag} = 1),
      {Total Volume},
      0.0
    )
  )
)

The error

“Expression {{argumentName}} for function {{functionName}} has incorrect argument type {{incorrectArgumentType}}. Function syntax expects {{functionSignature}}”

indicates a data type mismatch.

This error typically occurs when:

1. Fields appear numeric but are actually strings in the dataset

2. Mixed data types in comparisons or operations

3. Parameter vs field type mismatches

Check field data types:

  • Verify that {srs_mstr_fdrl_txbl_flag}, {srs_mstr_st_txbl_flag}, etc. are actually Integer or Decimal types, not String
  • Check {Total Volume} is numeric type

Test components individually:

{srs_mstr_fdrl_txbl_flag} = 1

Then:

({srs_mstr_fdrl_txbl_flag} = 1) OR ({srs_mstr_st_txbl_flag} = 1)

Fix data types:

If fields are strings, use parseInt() or parseDecimal():

ifelse( ${TaxStatus} = “Taxable”,

ifelse( (parseInt({srs_mstr_fdrl_txbl_flag}) = 1) OR (parseInt({srs_mstr_st_txbl_flag}) = 1), 

    {Total Volume}, 0.0 ), 

...

e.g.

ifelse( 
    ${TaxStatus} = "Taxable", 
    ifelse( 
        (parseInt({srs_mstr_fdrl_txbl_flag}) = 1) OR (parseInt({srs_mstr_st_txbl_flag}) = 1), 
        {Total Volume}, 
        0.0 
    ), 
    ifelse( 
        ${TaxStatus} = "Tax Exempt", 
        ifelse( 
            (parseInt({srs_mstr_fdrl_txbl_flag}) = 0) AND (parseInt({srs_mstr_st_txbl_flag}) = 0), 
            {Total Volume}, 
            0.0 
        ), 
        ifelse( 
            (parseInt({srs_mstr_fdrl_alt_min_tax_flag}) = 1) OR (parseInt({srs_mstr_st_alt_min_tax_flag}) = 1), 
            {Total Volume}, 
            0.0 
        ) 
    ) 
)

Verified that {srs_mstr_fdrl_txbl_flag}, {srs_mstr_st_txbl_flag} are integer data types , and also checked Total Volume is a decimal data type. also tested component individually was able to create a calculated field called Taxable - ifelse(({srs_mstr_fdrl_txbl_flag} = 1) OR ({srs_mstr_st_txbl_flag} = 1), {Total Volume}, 0.0)
error still persists