3 Replies Latest reply on Mar 21, 2012 5:47 AM by Alex Kerin

    Unable to aggregate Max and Min values to higher levels.

    Siva Tunga

      Unable to aggregate Max and Min values  to higher levels.                   

      I Have a scenario where I have to calcuate Max and Min variations for each transaction it can be multiple rows with same transaction. First I calculate the Max and Min at transaction level. This transactions are aggregated to Region or Marjket Segment sum up all Max and Min values. If I use the Tableau Max and Min Functionality   I can achieve this functionality using SQL server query or view which I do not want. Tableau should have some functionality to perform this. Is there a way in Tableau

        • 1. Re: Unable to aggregate Max and Min values to higher levels.
          Alex Kerin

          Guessing at your data structure and charts, I think you will want to look at the table calculations window_max and window_min.

          • 2. Re: Unable to aggregate Max and Min values to higher levels.
            Siva Tunga

            HI Alex, This did not work. Widnow_max requires aggregation either sum or Max.If I use sum it will duplicate the total value. If I use Max and Min. I am at the same state as I was in Max or MIn without window level.

             

            Here is a sample

             

            Reg    Transaction ID              Dollar Value Paid     Date

            South     123                             $ 1000                  02/02/2012

            South      123                              $ 200                  03/02/2012

            South      123                             $1500                  03/04/2012

            South 124                                 $ 400                    03/03/2012.

             

            Here I have only 2 transactions. 123 and 124. First I need to find Max and Min in these 2

             

            Reg Trans              Max            Min

            --------------------------------------------------------

            South 123             1500           200

            South 124              400            400

             

            So over all I need to get the information for South aggregated

             

            South                 Max            Min

            _____________________________

            South                1900           600

             

            To get this Max what I have in the last table, is it possible to do in Tableau, if I have data structure as Table 1.?

            • 3. Re: Unable to aggregate Max and Min values to higher levels.
              Alex Kerin

              Yes, you need to set the partitioning of the table calculation correctly. Can you post a tbwx?