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. May need aggregation in other calculations. Being able to treat data at row level provides us the greatest flexibility.

Last Variance

To get the Last Variance, we need to create the 2nd Last Date set first.

- Create a set in Date dimension. Name the set as the 2nd Last Date
- To get the 2nd Last Value: If 2nd Last Date Then Sales End

- To get the Last Variance, Sum(Last Value)-Sum(2nd Last Value)

- To get the Last Variance%: Last Variance/Sum(2nd Last Value)

Last Month/Value/Variance

We can apply the same technique to calculate the last Month/Value/Variance for which we need to first create the dimension of custom date in month:
Then we can create the Last Month/Value/Variance formulas.

The above is for the case without dimension. If there is Date dimension in view, the technique can be based on table calculations. But that is a different topic.
Feel free to download the workbook here.
0

Add a comment

(Refresh the page if you want to view the gif image multiple times. Or go to Tableau Public and click the button at the top-right corner.)

Jake and I collaborated on a dashboard. He told me that he learnt a way to create an in-place help page in Tableau. He first saw it at a conference somewhere and couldn't recall who the speaker was. So I am blogging here about it but the credit goes to somebody else. If anyone knows who the original creator is, leave a comment below.

The key idea is to float a semi transparent worksheet on top of the dashboard, where a help text box is strategically placed on top of each chart. This way, we can explain how to view each chart and what data points are important, etc. This worksheet is collapsible by a show/hide button. 

Below I would like to show how this worksheet can be constructed.

1. Sheet with a single data mark.

  • Double click the empty space in Marks panel and add two single quotes. Make the null pill a text label. This creates a single null mark.
  • Set the view as "Entire View"

2. Create an show/hide button

  • Go to the target dashboard
  • Drag a floating vertical container to the dashboard, making it cover all the area of interest.
  • Drag the Single Null Mark sheet and drop it into the above container. Hide the sheet title.
  • Create an open/close button for the container and place the button at the top-right corner.

3. Add annotations

  • Format the sheet background opacity as 70% in the layout manager             
  • Select area annotations and place them anywhere of interest. 
  • Write help text and format it to highlight important messages.  
  • The text can serve as functional guide and/or insight guide.

Here is an example. Feel free to download the workbook and explore. Click the "i" button at the top-right corner to view the in-place help. 

0

Add a comment

Loading