May 26, 2021 Tableau
Normal filters in Tableau are independent of each other. T his means that each filter reads all rows from the source data and creates its own results. /b10> However, in some cases, we want the second filter to process only the records returned by the first filter. /b11> Therefore, in this case, the second filter is called a dependent filter because they only process data that passes through the context filter. /b12> Context filters have two main purposes.
Using Thesample-superstore, let's find the top 10 subcategories for a product in a category called furniture. To achieve this, we follow these steps.
Drag the dimension category to the row shelf and the measure sales to the column shelf. /b10> Select the horizontal bar chart as the chart type. /b11> Drag the Wiig element category again to the filter holder. /b12> We get the chart below.
Right-click the field subcategory in the filter shelf, and then go to the fourth tab named Top. /b10> Select options based on the field. /b11> Select the top 10 options by sales from the next drop-down menu, as shown below.
Drag the dimension category to the filter holder. /b10> Right-click it to edit and select the furniture from the list under the General tab. /b11> As you can see the results show three sub-classes of products.
Right-click category - furniture filter and select options to add to context. /b10> This results in a final result that shows the product subcategories of the furniture category in the top 10 subcategories of all products.