Top n based on formula
https://community.tableau.com/.../top-n-based-on-formula1) Drag Sales, Month Fields onto Column shelf. 2) Right click on "Product" column, click on Create set. 3) Select Top Option, Select "By Field", Define Parameter Name, Minimum, Maximum. Interval............. 4) Drag Product onto Row shelf. 5) Drag Set onto filters shelf, select "IN" 6) Right click on Parameter, click on "Show Control".
Create a Simple Calculated Field - Tableau
help.tableau.com › current › proStep 1: Create the calculated field. In a worksheet in Tableau, select Analysis > Create Calculated Field. In the Calculation Editor that opens, give the calculated field a name. In this example, the calculated field is called Profit Ratio. Step 2: Enter a formula. In the Calculation Editor, enter a formula. This example uses the following formula: