Dashboard Mode - Parameter in calculated fields
Business Question
How can we use a parameter to dynamically change the sales target and see which products meet or exceed this target?
How can we use a parameter to dynamically change the sales target and see which products meet or exceed this target?
| Product | Category | Sales |
|---|---|---|
| Chair | Furniture | 250 |
| Desk | Furniture | 450 |
| Pen | Office Supplies | 150 |
| Notebook | Office Supplies | 300 |
| Phone | Technology | 600 |
| Monitor | Technology | 400 |
AVG([Sales])IF [Sales] >= [Sales Target] THEN 'Yes' ELSE 'No' END+----------------------+----------------------+ | KPI Card | Sales Target | | (Average Sales) | (Parameter) | +----------------------+----------------------+ | | | Bar Chart: Sales by Product | | | +----------------------------------------------+ | Table: Product Sales and Target Status | +----------------------------------------------+
The Sales Target parameter lets users change the sales goal number. When the parameter changes:
If you set the Sales Target parameter to 300, which products will show 'Yes' in the 'Meets Target' column?
Answer: Desk (450), Notebook (300), Phone (600), Monitor (400) will show 'Yes'. Chair (250) and Pen (150) will show 'No'.
parameter in a Tableau calculated field?Sales Target inside a calculated field in Tableau?Discount Rate set to 0.1 (10%), what will be the result of this calculated field if Sales = 1000?Sales * (1 - [Discount Rate])Top N to filter the top N products by sales using this calculated field:RANK(SUM([Sales])) <= [Top N]Top N should be an integer.Top N is not integer, the comparison with rank (which returns integer) fails, causing filter issues.Top N is not set to an integer type -> Option AMin Sales. You want to show only products with sales greater than this threshold. Which calculated field formula correctly uses the parameter to filter products?Pass the test and this pattern moves unknown