4 Replies Latest reply on Jun 13, 2016 8:06 PM by Manjula Raj

    How to split the array in tableau

    Manjula Raj

      I've a table charts and the column "data" has the array of array  values. The array has more than 90 values. I need to get the Max and Min of value from that array.

       

      Column value looks like this:

       

      [["2008-01-01 17:07:00 -0600", 96.27], ["2008-01-01 17:17:00 -0600", 96.29], ["2008-01-01 17:29:00 -0600", 96.3], ["2008-01-01 17:46:00 -0600", 96.36], ["2008-01-01 17:56:00 -0600", 96.5], ["2008-01-01 18:04:00 -0600", 96.53], ["2008-01-01 18:13:00 -0600", 96.56], ["2008-01-01 18:23:00 -0600", 96.55], ["2008-01-01 18:31:00 -0600", 96.4], ["2008-01-01 18:47:00 -0600", 96.43], ["2008-01-01 19:07:00 -0600", 96.45], ["2008-01-01 19:22:00 -0600", 96.55], ["2008-01-01 19:37:00 -0600", 96.59], ["2008-01-01 19:48:00 -0600", 96.54], ["2008-01-01 19:59:00 -0600", 96.41], ["2008-01-01 20:11:00 -0600", 96.36], ["2008-01-01 20:25:00 -0600", 96.42], ["2008-01-01 20:40:00 -0600", 96.4], ["2008-01-01 20:59:00 -0600", 96.4], ["2008-01-01 21:16:00 -0600", 96.36], ["2008-01-01 21:26:00 -0600", 96.36], ["2008-01-01 21:41:00 -0600", 96.41], ["2008-01-01 21:54:00 -0600", 96.4], ["2008-01-01 22:13:00 -0600", 96.36], ["2008-01-01 22:35:00 -0600", 96.35], ["2008-01-01 22:51:00 -0600", 96.4], ["2008-01-01 23:01:00 -0600", 96.42], ["2008-01-01 23:17:00 -0600", 96.42], ["2008-01-01 23:30:00 -0600", 96.4], ["2008-01-01 23:40:00 -0600", 96.45], ["2008-01-01 23:56:00 -0600", 96.46], ["2008-01-02 00:04:00 -0600", 96.45], ["2008-01-02 00:15:00 -0600", 96.47], ["2008-01-02 00:24:00 -0600", 96.39], ["2008-01-02 00:40:00 -0600", 96.39], ["2008-01-02 00:50:00 -0600", 96.41], ["2008-01-02 01:06:00 -0600", 96.44], ["2008-01-02 01:28:00 -0600", 96.4], ["2008-01-02 01:49:00 -0600", 96.4], ["2008-01-02 02:09:00 -0600", 96.31], ["2008-01-02 02:21:00 -0600", 96.41], ["2008-01-02 02:31:00 -0600", 96.34], ["2008-01-02 02:42:00 -0600", 96.35], ["2008-01-02 02:50:00 -0600", 96.37], ["2008-01-02 03:01:00 -0600", 96.43], ["2008-01-02 03:12:00 -0600", 96.46], ["2008-01-02 03:27:00 -0600", 96.45], ["2008-01-02 03:36:00 -0600", 96.54], ["2008-01-02 03:44:00 -0600", 96.61], ["2008-01-02 03:52:00 -0600", 96.58], ["2008-01-02 04:01:00 -0600", 96.59], ["2008-01-02 04:09:00 -0600", 96.78], ["2008-01-02 04:18:00 -0600", 96.72], ["2008-01-02 04:26:00 -0600", 96.58], ["2008-01-02 04:35:00 -0600", 96.74], ["2008-01-02 04:44:00 -0600", 96.73], ["2008-01-02 04:55:00 -0600", 96.79], ["2008-01-02 05:03:00 -0600", 96.91], ["2008-01-02 05:11:00 -0600", 97.07], ["2008-01-02 05:20:00 -0600", 97.17], ["2008-01-02 05:28:00 -0600", 97.37], ["2008-01-02 05:36:00 -0600", 97.39], ["2008-01-02 05:44:00 -0600", 97.39], ["2008-01-02 05:52:00 -0600", 97.3], ["2008-01-02 06:00:00 -0600", 97.32], ["2008-01-02 06:08:00 -0600", 97.33], ["2008-01-02 06:16:00 -0600", 97.37], ["2008-01-02 06:25:00 -0600", 97.37], ["2008-01-02 06:33:00 -0600", 97.32], ["2008-01-02 06:41:00 -0600", 97.51], ["2008-01-02 06:49:00 -0600", 97.49], ["2008-01-02 06:57:00 -0600", 97.34], ["2008-01-02 07:05:00 -0600", 97.48], ["2008-01-02 07:13:00 -0600", 98.21], ["2008-01-02 07:21:00 -0600", 97.96], ["2008-01-02 07:29:00 -0600", 97.98], ["2008-01-02 07:37:00 -0600", 97.88], ["2008-01-02 07:45:00 -0600", 97.82], ["2008-01-02 07:53:00 -0600", 97.69], ["2008-01-02 08:01:00 -0600", 98.15], ["2008-01-02 08:09:00 -0600", 97.93], ["2008-01-02 08:17:00 -0600", 97.99], ["2008-01-02 08:25:00 -0600", 98.06], ["2008-01-02 08:33:00 -0600", 98.23], ["2008-01-02 08:41:00 -0600", 98.01], ["2008-01-02 08:49:00 -0600", 98.23], ["2008-01-02 08:57:00 -0600", 98.06], ["2008-01-02 09:05:00 -0600", 98.03], ["2008-01-02 09:13:00 -0600", 97.9], ["2008-01-02 09:21:00 -0600", 97.86], ["2008-01-02 09:29:00 -0600", 97.93], ["2008-01-02 09:37:00 -0600", 97.98], ["2008-01-02 09:45:00 -0600", 98.04], ["2008-01-02 09:53:00 -0600", 97.97]]

       

      I'm a ruby developer. In ruby  do simply like this to get Max and Min:

       

      c = chart_array.map {|row| row[1]}

      => [96.27, 96.29, 96.3, 96.36, 96.5, 96.53, 96.56, 96.55, 96.4, 96.43, 96.45, 96.55, 96.59, 96.54, 96.41, 96.36, 96.42, 96.4, 96.4, 96.36, 96.36, 96.41, 96.4, 96.36, 96.35, 96.4, 96.42, 96.42, 96.4, 96.45, 96.46, 96.45, 96.47, 96.39, 96.39, 96.41, 96.44, 96.4, 96.4, 96.31, 96.41, 96.34, 96.35, 96.37, 96.43, 96.46, 96.45, 96.54, 96.61, 96.58, 96.59, 96.78, 96.72, 96.58, 96.74, 96.73, 96.79, 96.91, 97.07, 97.17, 97.37, 97.39, 97.39, 97.3, 97.32, 97.33, 97.37, 97.37, 97.32, 97.51, 97.49, 97.34, 97.48, 98.21, 97.96, 97.98, 97.88, 97.82, 97.69, 98.15, 97.93, 97.99, 98.06, 98.23, 98.01, 98.23, 98.06, 98.03, 97.9, 97.86, 97.93, 97.98, 98.04, 97.97]

       

      cs = c.sort

      => [96.27, 96.29, 96.3, 96.31, 96.34, 96.35, 96.35, 96.36, 96.36, 96.36, 96.36, 96.36, 96.37, 96.39, 96.39, 96.4, 96.4, 96.4, 96.4, 96.4, 96.4, 96.4, 96.4, 96.41, 96.41, 96.41, 96.41, 96.42, 96.42, 96.42, 96.43, 96.43, 96.44, 96.45, 96.45, 96.45, 96.45, 96.46, 96.46, 96.47, 96.5, 96.53, 96.54, 96.54, 96.55, 96.55, 96.56, 96.58, 96.58, 96.59, 96.59, 96.61, 96.72, 96.73, 96.74, 96.78, 96.79, 96.91, 97.07, 97.17, 97.3, 97.32, 97.32, 97.33, 97.34, 97.37, 97.37, 97.37, 97.39, 97.39, 97.48, 97.49, 97.51, 97.69, 97.82, 97.86, 97.88, 97.9, 97.93, 97.93, 97.96, 97.97, 97.98, 97.98, 97.99, 98.01, 98.03, 98.04, 98.06, 98.06, 98.15, 98.21, 98.23, 98.23]

       

      Min = cs[0]

      Max = cs[-1]

       

      I've 2000 charts in total and each chart has more than 90 values in data column. So i need the best way to do this.

       

      Please help.