1 Reply Latest reply on Jun 22, 2012 5:42 AM by Jonathan Drummey

# Tracking Online Sales

I am trying to figure out a simple way to track items that used to sell often but no longer do. The problem that I am having is that I am trying to identify a few items while looking at a lot of products. How would all of you recommend that I do this? The data I have at my disposal is Product name, Date sold, and quantity sold.

• ###### 1. Re: Tracking Online Sales

Hi Gabriel,

There are a variety of ways to go about this in Tableau. You don't specify volumes or data source, or your skill level with Tableau and manipulating data, so it's harder to come up with specific recommendations.

Also, how will you determine the "rate of change" you are interested in? And/or are you looking for products in the bottom N or bottom N % of all sales (by volume or by total sales) in the last period, or do you want to look at a tail and do some more complex calculations there? And/or are there products with no sales at all that you are trying to visualize (this is a little more complicated, because we will need to be telling Tableau that we are looking for data that doesn't exist)?

Here's one way, based on % difference in sales from last quarter to this quarter, it's also in the attached workbook using the Superstore Sales data.

- Put the Quarter of Order Date as a green pill on Columns, then click on the pill to change it to discrete (blue).

- Put Sub-Category on Rows.

- Put Sum of Sales on the Text shelf.

- Click on the Sum of Sales pill on the Text shelf to turn it into a Quick Table Calculation->Percent Difference.

- Click on the pill again and choose Edit Table Calculation, then click on the Customize button, then save the calculation (I called it % Diff in Sales).

- Click on the pill one more time and set the Compute Using to Order Date. This won't change the view at all, but "locks in" the table calculation settings so they won't change as the view is changed.

- Create a calculated field (I called it Last Col) with the following formula:

IF LAST()==0 THEN [% Diff in Sales] END

This uses the table calculation function LAST() to identify the last row in the data set.

- Drag the Last Col field onto the Rows shelf. It will come in as a green pill and change the view. Click on the green Last Col pill and set the Compute Using to Order Date. Click on the green Last Col pill and change it to Discrete (blue pill), then move it to the left of the Sub-category pill, then click on the pill once more and un-check Show Header. This now sorts the view to have the worst performers on top.

- Drag the Last Col field from the Measures window onto the Filters shelf (it will inherit the Compute Using settings of the previous instance of Last Col), and set it to Filter on Special->Non-Null values. You now have a text table that identifies the worst performers.

You can also create this as a bar chart, in the "graphical view" worksheet I just shifted the axes around and added the % Diff in Sales calc to the color shelf.

There are a few different ways to get rid of the high performers, for example you might alter the filter for Last Col to only show ones with a negative % Diff in Sales.

The instructions might seem complex, in fact they took longer to type than to implement.

Cheers,

Jonathan