4 Replies Latest reply on Nov 24, 2016 12:42 AM by jepperud.jensen

# Bar Chart with Count for Customers making 80% of Sales

Hi All,

I am trying to create a view where it is possible to see how many customers constitute 80% of sales. If looking at the attached image it is showing that 80% of sales goes to only 275 customers, while the remaining 20% goes to 2,500 customers in January.

However, I am not able to replicate this view in Tableau as I cannot create a set of Top Customers with the selection criteria that they must sum up to 80% of sales as well.

Any help on this would be highly appreciated!

Regards,

Jeppe

• ###### 1. Re: Bar Chart with Count for Customers making 80% of Sales

So here's a start but It's not completely replicating your picture at this point. but It does show running % totals up to 80% and shows the count of customers to achieve this.

Here is a link to my Tableau Public if you don't have Tableau 10.1.

Thank you,

Jmc

• ###### 2. Re: Bar Chart with Count for Customers making 80% of Sales

TOPN% is kind of tricky to create chart.

[Cutomer x Month]

str([Customer No])+"_"+[Month name]

[% of Month]

running_sum(sum([Sales]))/attr({fixed [Month name]:sum([Sales])})

[In/ Out]

if [% of Month]<=0.8 then "IN" else "OUT" end

[Filter]    /// picking up lat line of <80% and last line of 100%

if [% of Month]<=0.8 and lookup([% of Month],1)>=0.8

or

[% of Month]>=1

then "show" end

Thanks,

Shin

• ###### 3. Re: Bar Chart with Count for Customers making 80% of Sales

Hi John,

As you also mention not completely what I'm after but definitely part of the puzzle.

Thank you,

Jeppe

• ###### 4. Re: Bar Chart with Count for Customers making 80% of Sales

Hi Shin,

Really tricky indeed! Thanks for your reply, I have some problems with it as my actual data doesn't seem to match the solution perfectly. But it is a great help and a large step in the right direction.

Definitely helped me come up with a solution!

Thank you,

Jeppe