YoY%: Table Calcs

In order to show your previous sales as seen below, you will be required to used the function: Last ( )

Here is how you recreate this view.

  1. Previous Year - the calculation for this is a Boolean statement. The LAST() function in Tableau returns the last value of a specified dimension within the current partition or table. In this case we want the previous to last.

Last()<=1

  1. Move your Boolean statement onto the filter shelf and select True. Due to the Boolean having '<' less than or '=' equal to 1, this will return both the current year ( which is zero ) and the previous (which is 1). All that is left to do is the table calculation.

  1. By selecting on the sales value in your Measure Value marks card > Quick Table Calculation > Percentage Difference
  1. In the Edit Calculation, make sure to select 'Percentage Difference From' on the drop down. Specify you are looking at the Table (down) view and that you want this difference relative to the previous view.

Author:
Alexandra Skelly
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab