1 Reply Latest reply on Mar 25, 2019 9:59 AM by Nathan Mannheimer

    Cannot interpret json value of type 'array' as scalar value

    RAHUL Puri

      Hi Community,

       

      Please help to resolve this issue. I am new to python, trying to add the 2 numbers which are passing from the two parameters as shown in below i.e First Number and Second Number.To split the numbers in parameter created split calculation in Tableau Level.I wrote the python logic to add the numbers which are passing from the First number and second number parameter.

      Issue Snapshot.png

      When I execute the above logic. Python throwing an error  "Cannot interpret json value of type 'array' as scalar value"

      Python Error.png

      The same logic have executed at python IDE. I didn't face any issue. The logic shown in below

       

      import numpy as np

      i=0

      First=np.array([[1,2,3]])

      n=len(First)

      Second=np.array([[4,5,6]])

      third_arr=np.array([])

      while i<=n:

            third_arr=First+Second

            break

      print(third_arr.tolist())

       

      Kindly help me where I am doing wrong in Tableau Calculation.

       

      Thanks,

      Rahul Puri