Complete the code to create a dimension field in Tableau.
IF [Category] = [1] THEN "Selected" ELSE "Other" END
Dimensions are categorical fields like 'Category'. Here, we compare the Category to a text value.
Complete the code to calculate total sales as a measure in Tableau.
[1]([Sales])Measures are numeric and can be aggregated. SUM adds all sales values.
Fix the error in this calculated field to correctly create a measure for average profit.
AVG([1])Measures require field names in square brackets in Tableau formulas.
Fill both blanks to create a calculated field that classifies sales as 'High' if above 1000, else 'Low'.
IF [1] > [2] THEN "High" ELSE "Low" END
We compare the measure [Sales] to the number 1000 to classify sales levels.
Fill all three blanks to create a calculated field that returns the profit ratio if sales are positive, else zero.
IF [1] > 0 THEN [2] / [3] ELSE 0 END
The formula checks if sales are positive, then divides profit by sales to get the ratio.