Dashboard Mode - Logical functions (IF, IIF, CASE)
Dashboard Goal
Understand how to use logical functions IF, IIF, and CASE in Tableau to categorize sales performance and visualize results.
Understand how to use logical functions IF, IIF, and CASE in Tableau to categorize sales performance and visualize results.
| Order ID | Sales | Region |
|---|---|---|
| 1001 | 150 | East |
| 1002 | 300 | West |
| 1003 | 50 | East |
| 1004 | 400 | South |
| 1005 | 200 | West |
| 1006 | 100 | South |
| 1007 | 250 | East |
SUM([Sales])IF [Sales] >= 300 THEN 'High' ELSEIF [Sales] >= 150 THEN 'Medium' ELSE 'Low' END
IIF([Sales] >= 300, 'High', IIF([Sales] >= 150, 'Medium', 'Low'))
CASE [Region] WHEN 'East' THEN 'Group A' WHEN 'West' THEN 'Group B' ELSE 'Group C' END
+----------------------+-----------------------+ | Total Sales (KPI) | Sales by Sales Category| | | (Bar Chart) | +----------------------+-----------------------+ | Pie Chart: Sales by Region Group | | | +-----------------------------------------------+
A filter on Region allows users to select one or more regions. When applied, the Total Sales KPI, Sales by Sales Category bar chart, and Sales Distribution by Region Group pie chart update to show data only for the selected regions.
If you add a filter for Region = East, which components update and what data do they show?