2 Replies Latest reply on May 9, 2018 3:10 PM by Jim Dehner

    Return the Max Value of one column dependind on the value of another column

    Conrado Fabri

      Hello Guys! So, i'm quite new to tableau and i'm having trouble trying to return the maximum value of one column based on another column

       

      The structure is: I have Col1 = Product_id and Col2 = Volume_id. So my SQL tables are like this

       

      Product_IDVolume_id
      11
      21
      31
      32
      33
      41
      42

       

      So what i need is the maximum number of volumes [(maximum volume_id(Col2)] for the same product_id (Col1). For example, for Product_id=1 i want the volume_id=1, for product_id=3 i want the volume_id=3 and for product_id=4 i want the volume_id=2. I've tried the Fixed function but it didn't work, so basically i need some help. I'm using Tableau Prep by the way but i believe the calculated fields work the same way. Thank you in advance