4 Replies Latest reply on Jan 19, 2014 5:46 AM by Matt Lutton

# How to show the latest date of sale of each product of each salesman

How to show the latest date of sale of each product of each salesman?

I have the following date

i.e.

Date SalemanProducts
1/1/14PeterHat
1/9/13PeterHat
1/6/13PeterSunglasses
1/8/13SamHat

I want to show in Tableau is showing the latest date of sale

i.e.

1/1/14PeterHat
1/6/13PeterSunglasses
1/8/13SamHat
• ###### 1. Re: How to show the latest date of sale of each product of each salesman

Here is one way to address it using a simple Table Calc of:

LAST()

To do this, I created a combined field of Salesman+Product, so I could compute the Table Calculation across this new dimension.

I placed that in the view, between Date and Saleman on the Rows shelf, then right clicked on the pill and de-selected "Show Header", so this column is not shown in the view, but I can use it in the Table Calculation's compute using settings.

Then, I placed the LAST field on the filter shelf, set it to a range of 0 to 0 (keep only the first row in the partition), then set up the partitioning in the Table Calculation > Compute Using > Advanced dialog as follows (click to enlarge)

Version 8.1 workbook attached.  Let me know if you have questions.  If you want to use this method in your workbook, you may have to change the settings/set up of your view, because Table Calculations compute based on the dimensions in your view--if you have more dimensions, the advanced settings will look a bit different.  But for the scenario you posted, this solution works very well.

• ###### 2. Re: Re: How to show the latest date of sale of each product of each salesman

Here's another workbook I had handy, which demonstrates the same technique on another data set.

• ###### 3. Re: How to show the latest date of sale of each product of each salesman

Thank you so much!

• ###### 4. Re: How to show the latest date of sale of each product of each salesman

No problem! Were you able to resolve your issue? Please don't forget to mark the question answered in some way if you have resolved the problem. Cheers!