1 Reply Latest reply on Aug 30, 2016 1:32 AM by Steve Taylor

    Using CAST in a calculated field

    Itay Aizik

      Hi all,

       

      Hope I'm not asking something that was already discussed :-)

      I'm using the Tableau Desktop and I'm trying to use a calculated field. 

      I tried to divide two fields, which are set as numbers, but the system suggested to use float.

      When I try to cast these fields as float, I get an error.

       

      This is my syntax:

      CAST(SUM([impc1]) AS float) / CAST(SUM([Event Name]) AS float)

      and this the error message:

      Expected closing parenthesis or comma while parsing argument list for CAST.

       

      I tried to look the web for a solution, but couldn't find one.

       

      What am I doing wrong?

       

      Thanks,

      Itay.