1

I'm teaching myself Tableau and occasionally run into challenges. I have a dataset like the one below and I'm trying to create two calculated fields to display either the row that has the minimum value for the sum of the columns or the maximum value for the sum of the columns.

Parcel  Period 1 Period 2
A       500      300
B       250      200
C       750      500
D       -375     -500   
E       2000     1000
F       0        200
G       -750     -100

So the MIN should show:

Parcel     Total
D          -875

and the MAX should show:

Parcel    Total
E         3000

I can get the minimum and the maximum, but I haven't been able to figure out how to show the other column(s) that correspond to the Min or Max Total.

Any guidance is much appreciated.

VonHugenstein
  • 109
  • 2
  • 10
  • There are a couple of features to learn about in Tableau that are useful for problems like this. First, play with the "top" tab on the filter dialogs, that let's you filter to only the top (or bottom) K records. The other feature to learn about are level of detail (LOD) calculations. LOD calcs will let you solve many types of problems, but are frequently useful for identifying "top" records in some way – Alex Blakemore Apr 03 '23 at 17:23

1 Answers1

2

You can add a filter, then drag period 1 into filters set it to be maximum amount, or use your calculated column if you only want the single max.

enter image description here enter image description here

user540393
  • 145
  • 7
  • Thanks. I was having an issue with the order that I added to the worksheet. I finally was able to reproduce this for both the Min and the Max Much appreciated! – VonHugenstein Mar 30 '23 at 17:07