1
votes

On a tableau dashboard there are 2 filters and a bar graph. The filters are 1. to select top or bottom customers 2. how many ex:5,10,15 etc when the user selects top and 5 in the respective filters then top5 customers have to show in the bar graph. if the user selects bottom ,10 in the respective filters then bottom 10 customers have to shown in the graph.

how to achieve this when the data contains only customers details and their billing amount ?

1

1 Answers

0
votes

Instead of filter, you can go with the Parameter for getting the result. I have done the top and bottom multiple times in many of the tableau visualizations and its so easy.

Below are the steps to achieve your requirement.

  1. Create a parameter that will allow you to select top and bottom

  2. Create another parameter that will allow you to select the desired numbers like 5, 10, 15 etc.

Parameter

Here i have created a parameter that will have values from 10 to 50 in a step size of 10.

  1. Create a calculated field that will subset data based on the parameters chosen

Calculation

In the above screenshot, I am using the top site parameter and creating a conditional statement that will show the states based on the value chosen in the site parameter and the value for that state.

  1. Put the calculated field in the filter and select show and click ok in the filter box.

Now the view will show the top count based on the value selected in the parameter.

Please note the calculation is for top N and for bottom N you need to change the calculation.

Hope this will help you. I can provide you a workbook if you need.