8 Replies Latest reply on Apr 13, 2018 1:56 PM by Brad Kunst

    Need help getting min and max for combined data

    Brad Kunst

      I have data for individual depts. that I am combining for each date in a series.  I need to calculate the sum, avg, min, and max for each date group.  I have figured out how to get the sum and average using LOD calculations, however, I have not been able to calculate the min and max.

       

      Following is a sample of my data:

       

      Dept. (Dimension)     Date (Dimension)       Volume (Measure)

      Dept1                                        3/3/2018                              33
      Dept2                                        3/3/2018                            202
      Dept3                                        3/3/2018                              42
                                                                  3/3/2018  Total        277

       

      Dept1                                      3/17/2018                              21
      Dept2                                      3/17/2018                            139
      Dept3                                      3/17/2018                              50
                                                                  3/17/2018  Total      220

       

       

       

      Dept1                                      3/31/2018                              23
      Dept2                                      3/31/2018                            171
      Dept3                                      3/31/2018                              48
                                                                  3/31/2018  Total      242

       

      Combined stats for 3 dates:

                                      sum       739 (277+220+242)
                                      avg        246 (sum / 3)
                                      min        220
                                     max        277

       

      I have used the following LOD calculations in Tableau to get the sum and average and they are working.  I now need to figure out how to get the min and max.

                      Sum           sum({fixed [Dept], [Date]: min([Volume])})
                      Average    sum({fixed [Dept], [Date] : min([Volume])}) / countd([Date])

       

      This forum has been great and very responsive in the past.  I am hoping to get another great response this time.

       

      Thanks!

       

      Brad Kunst