0
votes

How to display the max values for each distinct item in Tableau?

Column1, Column2, time_stamp

user1, data1, t2

user1, data2, t1

user1, data5, t4

user2, data4, t7

user2, data7, t9

user2, data3, t6

constraint t1 < t2 < t3.... < tn

The output should be

Column1, Column2, time_stamp

user1, data5, t4

user2, data7, t9

I tried the following but I am not sure what it does exactly especially first == 0? what does that tell tableau?

IF FIRST()==0 THEN MAX([time_stamp]) END

1

1 Answers

0
votes

put Column1 on the rows shelf, MAX(Column2) on the labels shelf. You may need to make sure Column2 is treated as a measure if it isn't already. The easiest way on Windows is to hold down the right mouse button when you drop Column2, and select MAX. Then you should see a table. Finally drag time_stamp onto the table directly, using the same right mouse/MAX trick.

On a mac, hold down one of the modifier keys to get the same effect of a right mouse drag