Wednesday, June 14, 2023

How to create Top N and Bottom N Sets in Tableau

 To create Top N and Bottom N sets in Tableau, you can use sets, which are custom subsets of data based on specified conditions. Here's a step-by-step guide to creating Top N and Bottom N sets:


Start by connecting to your data source in Tableau and create a visualization (e.g., bar chart, line chart, etc.) based on the desired dimensions and measures.


To create a Top N set:


  1. Select the dimension you want to use for ranking (e.g., product, region, etc.) in the Data pane or on the view.
  2. Right-click on the dimension and select "Create Set."
  3. In the Set dialog box, choose the "Top" tab.
  4. Enter the desired number of items you want to include (e.g., 5, 10, etc.) in the "By Field" box.
  5. Select "Top" from the "Select" drop-down menu.
  6. Click OK to create the set.


To create a Bottom N set:


  1. Follow the same steps as above to create a Top N set.
  2. After creating the set, right-click on the dimension and select "Edit Set."
  3. In the Set dialog box, switch to the "Bottom" tab.
  4. Enter the desired number of items you want to include (e.g., 5, 10, etc.) in the "By Field" box.
  5. Select "Bottom" from the "Select" drop-down menu.
  6. Click OK to update the set.


Now that you have created the sets, you can use them in your visualization:


  1. Drag the measure you want to analyze (e.g., sales, profit, etc.) to the Rows or Columns shelf.
  2. Drag the dimension you created the set for to the Rows, Columns, or Color shelf.
  3. Right-click on the dimension in the view and select "Show Set" > [Set Name] to display the Top N or Bottom N set.
  4. By following these steps, you can create Top N and Bottom N sets in Tableau. The sets allow you to define subsets of data based on the specified criteria, such as the top or bottom values. You can use these sets to filter your visualization or create custom calculations based on the selected set.


Furthermore, you can enhance your visualizations by adding additional dimensions or measures, applying different chart types, or incorporating other Tableau features to provide more insights into your data.


Thanks for Reading, Subscribe us for more latest Visualization From scratch. 

No comments:

Post a Comment

If you have any doubts. Please let me know

How can you create an alias for a table in a SQL query?

In SQL, you can create an alias for a table in a query to give the table a temporary, alternative name that you can use in the query. Table ...