3
votes

I have a spreadsheet of flight delay data, and I'm working on a worksheet that shows the total delay time per airport. I want to filter the dimension "Airports", i.e. create categories of airports, "Small", "Medium" and "Large", based on the number of departures from each airport, which is calculated by counting the Dimension "Flight Number".

I currently have a IN/OUT filter using a set "Small Airports", created on the dimension "Airports" based on the condition

COUNT([Flight Number])<500,

but this method only lets me divide the airports into two categories.

EDIT: @Siva Here's a sample of the columns I'm referring to, it's copied into an Excel sheet as the sheet I'm actually using in Tableau has over 30 columns;extract from the database into an Excel sheet

2
you need to create more sets not single one.. post sample data and your conditons will provide solution - Siva

2 Answers

3
votes

Try using a calculated field based on the COUNT([Flight Number]). This field can be used as a filter or a dimension for size, color, etc. on the visualization.

IF COUNT([Flight Number]) < 500 THEN "Small"
ELSEIF COUNT([Flight Number]) < 1000 THEN "Medium"
ELSE "Large"
END
3
votes

Use a fixed LOD calc

{FIXED [AIRPORT] : IF COUNT([Flight Number]) < 500 THEN "Small" ELSEIF COUNT([Flight Number]) < 1000 THEN "Medium" ELSE "Large" END }

This labels airports as Dinesh Sundar showed with an aggregate calc, but fixed LOD calcs are not affected by other dimensions on the view - and are also computed prior to most filters