WBS and Activity Codes in P6: Structure a Schedule You Can Actually Filter
A schedule with good logic and poor structure is still hard to use. When the site manager asks for "everything in Level 2, east zone, for the next three weeks" or the client wants "all the electrical work by building", you should be able to produce it in a minute, not an afternoon.
That comes down to two things in Primavera P6: the work breakdown structure (WBS) and activity codes. This article explains what each is for, how to split information between them, and how to set them up so filtering, grouping and reporting stay easy for the life of the project.
WBS and activity codes do different jobs
The most common mistake is trying to make the WBS do everything.
- The WBS is a single hierarchy. Every activity sits in exactly one WBS element. It is good for one primary way of breaking down the job, and it drives summary bars, roll-ups and, often, cost reporting.
- Activity codes are tags. An activity can carry a value for as many code types as you set up: area, trade, phase, responsible party, and so on. They are ideal for the many other ways people want to slice the schedule.
So the WBS answers "where does this activity live?" and activity codes answer "what else do we need to know about it?" Keep the WBS clean and put the extra dimensions into codes.
Choosing the primary WBS breakdown
Pick the breakdown that most people will use most of the time. On construction projects, common choices are:
- By location, for example building, then level, then zone. Works well when progress and look-aheads are run by area.
- By phase or package, for example design, procurement, construction, commissioning. Useful when different teams own each stage.
- By contract structure, matching the bill or cost breakdown, which helps if the schedule feeds cost or earned value reporting.
A typical construction WBS uses a mix at different levels, for example:
- Project
- Milestones and key dates
- Design and approvals
- Procurement
- Construction, broken down by building, then level
- Testing and commissioning
- Handover
Keep it to three or four levels where you can. Deep WBS trees look thorough but make the schedule harder to read and slower to navigate.
What to put in activity codes
Once the WBS holds the main breakdown, use activity codes for everything else people filter on. A practical starting set for a building project:
| Code type | Example values | Used for |
|---|---|---|
| Area / Zone | L1-East, L1-West, L2-East, Roof | Area look-aheads, progress walks |
| Trade | Civils, Structure, Envelope, Mechanical, Electrical, Finishes | Subcontractor reports |
| Responsible | Main contractor, Client, Designer, Subcontractor name | Who owns the action |
| Phase | Enabling, Shell, Fit-out, Commissioning | High-level reporting |
| Activity type | Design, Approval, Procurement, Install, Test | Filtering out non-site work |
| Look-ahead flag | Yes / No | Short-term planning views |
Start small. Five or six code types that are filled in consistently beat twenty that are half complete.
Global, EPS or project codes
P6 lets you create activity codes at three levels:
- Global codes are available to every project in the database.
- EPS codes are available to projects under a particular branch of the enterprise project structure.
- Project codes belong to one project only.
If you work in a shared company database, check with whoever administers it before creating global codes, because everyone will see them. For a single project, project-level codes are usually the safest choice and travel with the project when you export an XER file.
Setting up codes in practice
The general workflow in P6 is:
- Open the Activity Codes dictionary from the Enterprise or Project menu (the exact menu location varies slightly by version).
- Create a code type, for example "Area".
- Add the code values, each with a short value and a description, for example "L2E" with the description "Level 2 East".
- In the Activities window, add the code type as a column, then assign values, either one at a time or by selecting many activities and filling down.
Some tips that save time:
- Use short, sortable values. "L01-E" sorts better than "Level 1 East" and avoids alphabetical surprises such as Level 10 appearing before Level 2.
- Add descriptions. The value is for sorting; the description is for people reading the report.
- Order values deliberately. P6 groups by the order in the code dictionary, so arrange values in the order you want them to appear, not in the order you created them.
Activity ID conventions
Activity IDs are another way to carry structure. A readable convention, such as a prefix for area and trade followed by a number, helps people find activities quickly in a printout. For example:
- L2E-EL-1040: Level 2 East, Electrical, activity 1040.
Do not rely on IDs alone for filtering. They are harder to change later, and one renumbering exercise can break references in correspondence. Use codes for filtering and keep IDs stable once the schedule has been issued.
Turning structure into useful views
The payoff comes when you save layouts and filters that use the structure. A few that are worth setting up early:
- Area look-ahead. Filter for activities starting or in progress within the next three weeks, group by Area, then by Trade.
- Trade report. Group by Trade, then by Area, with only that subcontractor's activities shown. Easy to issue each week.
- Client actions. Filter Responsible equals Client, sorted by start date. Useful for chasing approvals and information.
- Procurement tracker. Filter Activity type equals Procurement, showing early finish and total float.
- Management summary. Group by WBS level 2 only, collapsed, with key milestones.
Save each as a named layout so anyone on the team can open it and get the same result. Name them clearly, for example "03 Area 3-week look-ahead", so they sort in a sensible order.
Keeping the structure clean over time
Structure tends to decay during a project. New activities get added in a hurry, codes are left blank and the WBS gets an "Other" element that grows each month. A short routine keeps it under control:
- At each update, filter for activities with a blank value in your key code types and fill them in.
- Do not create new WBS elements without a reason. If a new area or package genuinely appears, add it properly and tell the team.
- Avoid catch-all elements and code values such as "Misc". If you need one, review it monthly and reclassify.
- When you add a code type mid-project, fill it for every existing activity, or the views that use it will mislead people.
The Microsoft Project equivalent
Microsoft Project does not use the same terms, but you can achieve much the same result:
- Outline structure (summary tasks) plays the role of the WBS. Keep it shallow for the same reasons.
- Custom fields, such as the Text fields, or outline codes, play the role of activity codes. Set up a lookup table so values are picked from a list rather than typed freehand.
- Groups, filters and views do the same job as P6 layouts. Save them in the project file, or in your global template if you want to reuse them.
The principle is the same in both tools: one clean hierarchy, plus a small set of consistently filled tags.
A quick checklist before you issue a schedule
- Does every activity sit in the right WBS element?
- Are your key activity code types filled in for every activity?
- Do code values sort in a sensible order?
- Are activity IDs readable and stable?
- Are the standard layouts saved and named clearly?
Getting structure right takes an hour or two at the start of a project. It saves that time back every week in look-aheads, subcontractor reports and client meetings, and it makes the schedule something the whole team can use rather than a file only the planner can read.
One practical scheduling lesson every week, from 25 years planning big, complex builds. Join Critical Path Notes Weekly.
Get the free 3-week look-ahead template
A ready-to-use Excel file with a 15-working-day bar chart, a constraints log and a weekly PPC review. Sign up below and it lands in your inbox, along with one practical scheduling lesson every week.