1 Reply Latest reply on Aug 29, 2016 10:28 PM by Mahfooj Khan

    Calculated Fields

    lim.shijia

      Hi everyone,

       

      I am quite confused between this two calculated fields, what is the difference between putting the INT at the front or not having it at all?

       

      1: CASE [Subcategory] WHEN "aaa" THEN [Amount] END

      2: INT(CASE [Subcategory] WHEN "aaa" THEN [Amount] END)

       

      Thanks!!

        • 1. Re: Calculated Fields
          Mahfooj Khan

          Could you please tell me the Data type of [Amount] field??

          I'm assuming its a numeric field as per the naming convention.

           

          Now come to your first case statement, If the condition ([Subcategory] = "aaa") matches then only you'll get the amount of that subcategory(aaa).

           

          Your second case is also doing the same but you're trying to convert the data type of resulted[Amount] of Subcategory(aaa) to integer. If the [Amount] field is already a numeric field then you'll get a data type conversion error.

           

          Hope you get my point.

           

          Mahfooj

          2 of 2 people found this helpful