What’s wrong with my Calculation?

Viewing 2 reply threads
  • Author
    Posts
  • November 28, 2019 at 7:54 AM #38372

    Martin Inchley
    Participant

    A simple Calculation (number) field is warming my brain!

    IF(Type = "Dividend";24;32)

    “Type” is the name of a Script field which contains “Dividend” or one of two other values.
    24 and 32 are two arbitrary numbers to help me sort things out.

    With this Calculation, all the records have 24 in the Calculation field, no matter whether Type contains “Dividend” or one of the other values.

    With IF(Type = "";24;32), all the records still show 24.
    With IF(TaxYear = "1718";24;32), all the records in Tax Year 1718 show 24. The others show 32, as expected.

    I can’t see what I’m doing wrong when referencing the field “Type”.

    November 28, 2019 at 2:41 PM #38380

    Brendan
    Keymaster

    The IF() function works only on numeric type data. Use IFEQUAL(Type; "Dividend"; 24; 32) for comparing text vales.

    November 28, 2019 at 2:49 PM #38383

    Martin Inchley
    Participant

    Easy when you think like an IF !

Viewing 2 reply threads

You must be logged in to reply to this topic.