Quantcast
Channel: InterWorks
Viewing all articles
Browse latest Browse all 2698

Advance with Assist: Creating a Distribution of Sales in Tableau

$
0
0
Advance with Assist: Creating a Distribution of Sales in Tableau

Question: How would I go about calculating how many states generate a specific percentage range of sales? Like > 10% of total sales as an example? I want to know where to target more marketing efforts. Can you help me get started?

As with most things Tableau, there are a variety of ways someone could approach this question: a combination of calculations, building a view then using table calculations, etc. I like the approach of writing multiple calculations because it simplifies my process. Both options can work, but the former is my preference.

What Is Needed

We need three pieces of information to build the view this client was after. I will use Sample Superstore data if you want to duplicate this in your Tableau workbook:

  1. Total Sales
  2. State Percentage of Total Sales
  3. The Distribution Logic desired

Total Sales

For this calculation, I decided to use a FIXED level-of-detail calculation (LOD for short). It looks like this:

LOD calculation in Tableau

State Percentage of Total Sales

Again, I will be using a FIXED LOD for this calculation but this time with the addition of the State to pull in each State level to the calc:

fixed LOD calculation in Tableau

The Distribution Logic

For this calculation, we only need to determine the final distribution logic we want for our Tableau report. The question posed mentioned >10%, so let’s build that out.

For reference, so far, our Tableau report could look something like this with these calculations added to a sales report:

distribution of sales in Tableau

distribution of sales in Tableau

You could add additional logic with ELSEIF if you needed to group more than two ranges.

My final report now gives me the states that I was after for the distribution questions:

distribution of sales in Tableau

The post Advance with Assist: Creating a Distribution of Sales in Tableau appeared first on InterWorks.


Viewing all articles
Browse latest Browse all 2698

Trending Articles