1 of 1 people found this helpful
Here is the basic steps to filter top N with parameter! If you have any question, please ask.
- Drag "Manufacturer "to the Rows shelf. (Manufacturer is a sample dimension name)
- Drag "Sales" to the Columns shelf.
- In the Data pane, click the drop down to the right of Dimensions and select Create Parameter.
- Name the Parameter (in this case "Top N").
- To the right of Allowable values:, in the Create Parameter window, select Range.
- Under Range of values, specify the Minimum, Maximum, and Step size desired.
- Click OK.
- Right click on "Manufacturer" in the Rows shelf and select Edit Filter.
- Navigate to the Top tab in the Filter window.
- Select By field:
- In the second drop down field to the left of "by", select "Top N"
- Ensure that the field to filter by (usually a measure) is specified, in case "Sales" as "Sum".
- Click OK.
- In the Data pane, under Parameters, right click on "Top N" and select Show Parameter Control.
- In the upper right corner of the view, there is now a "Top N" slider and number field. Changing this field by moving the slider, will change what is shown in the view.
- Lastly, in the toolbar at the top of the screen, click on the Descending button icon, which will sort SUM(Sales).
Please don't forget to mark correct Thank you.
Thank You very much Yasin for your prompt reply. You helped me in creating the parameter correctly.
But if I may ask you since I am somehow new to Tableau and I feel I was not clear in my first question, let's say I have 10 departments, and within those departments, I need to see Top N for each "Manufacturer " in each department using the parameter.
So first what I think, I should filter the desired department/s, then I need to use the parameter to see the top N for that "Manufacturer ", and this is the step which I am struggling in.
Because when I select a specific department, and then I use the parameter to see the Top 10 for example within this department, the result will show just the top 4 despite that department has more than 70 "Manufacturers". On the other hand, if I am not doing any filtration, the parameter is working correctly.
Thanking you in advance & best regards.