May
23
Getting the Last Date/Value/Variance in Tableau
There are probable half a dozen ways to do it, under different circumstances. Each technique may have its own advantages.
Here is my favorite technique, which is
1) independent of date dimension.
2) can be used from a secondary data source.
3) applicable in labels, references and annotations.
It has served me well in a number of designs. Just want to share the techniques here with you.
Here are the main steps for getting them.
Last Date
1.Create Top 1 set in Date dimension. Name the set as Last Date.
One may get the last date using Level of Details instead of Set. But then you have to be very careful of date filters.
2.To get the Last Order Date (as a Date type):
Last Value
To get the Last Value:
Note that this is at the row level or record level.
Here is my favorite technique, which is
1) independent of date dimension.
2) can be used from a secondary data source.
3) applicable in labels, references and annotations.
It has served me well in a number of designs. Just want to share the techniques here with you.
Here are the main steps for getting them.
Last Date
1.Create Top 1 set in Date dimension. Name the set as Last Date.
One may get the last date using Level of Details instead of Set. But then you have to be very careful of date filters.
2.To get the Last Order Date (as a Date type):
Last Value
To get the Last Value:
Note that this is at the row level or record level.