Order Date Max Date

 

Making Max(Date) Work

Working with dates is one of those tableau things which is often easy but is sometimes infuriating, and one of those times is when dealing with finding the most recent date, the intuitive temptation is to use [Date]=max([Date]) to find the most recent date but that doesn't work as date is a dimension and max date is an aggregate so you are forced to use attr([Date])=Max([Date]).

Attr(DATE)=max(DATE) doesn't work because for each row in the data the max date is in that row, so we need to make it ignore the rows and look for the max date in the column, and the solution to use a level of detail.

DATE={ max(Date) } this isn’t a proper fully formed level of detail calculation but it essentially says to ignore all dimensions and to look at the measures across the whole table.

 

This allows us to filter for the most recent date in a column full of dates! Or to colour only the most recent date

 

As always hope that this helps!

Follow @cloudstream_uk for more #TodaysTableauTip

Free Alteryx Trial!

Free Tableau Trial!

Get in touch with us today!

Contact us
Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok