6 Replies Latest reply on Aug 3, 2018 9:23 AM by Jerome Breil

# Count number of records

Good morning all,

I'm working on a supply chain tool and I ve a table with several scenarios to compare. Then my table is simple : The number of the scenario, costs and service.

I display the different point with a point graph : x-axis = service, y-axis = costs, 1 point = 1 scenario.

I've created two parameters : target service, target costs. Then, I ve created a calculated field saying : Service > target service and Costs < target costs, then "green", else "red".

With this, I m coloring in green and red the point on the graph.

The ultimate step that I would like to be able to achieve, is to draw a pie-chart or a side-bar with the proportion of red/green (x%, y% and a visual representation of the two parts). This would enable the strategist to see in one eye how many scenarios is meeting its targets (instead of counting the points....).

Thanks you a lot for you help in advance,

Jerome

• ###### 1. Re: Count number of records

Hi Jerome,

with the Number of records column in tableau (auto generated you will be able to achieve it),

is there any chance possible to attach the workbook with mock data so that it will be lot helpful to crack the problem

BR,

NB

• ###### 2. Re: Count number of records

It was a little bit more complicated as in fact I've also a column "month" and I was looking to have yearly value. So I used "fixed" and count if condition is satisfied and it works : I m able to have the repartition that I want like 20%-80% for instance.

The only thing now is I don t know how to use these two number to define a pie chart to have a visual representation of it

I will edit a mock page if I don't find the solution...

Thanks again,

Jerome

• ###### 3. Re: Count number of records

Hi jerome,

Based on your answer it seem you are having 2 measures one with 20%value and other with 80% value

Is it right?

BR,

NB

• ###### 4. Re: Count number of records

Exactly

Jerome

• ###### 5. Re: Count number of records

Hi Jerome,

1) Drag measure names to filter and select the two measure which you are having 80 and 20 values

2) Drag measure names to color in the marks section

3) Change the marks section to pie

4) drag the measure value to angle

there you go you will get a pie with 80 and 20%