luvv to helpDiscover the Best Free Online Tools
Topic 4 of 8

Clarifying Filters And Segments

Learn Clarifying Filters And Segments for free with explanations, exercises, and a quick test (for BI Developer).

Published: December 24, 2025 | Updated: December 24, 2025

Why this matters

BI Developers turn vague stakeholder requests into precise, testable logic. Filters and segments drive what rows enter a query and which audiences or cohorts are compared. If you misinterpret them, numbers become untrustworthy and decisions go the wrong way.

  • Real tasks you will face: define "active user" for a weekly dashboard, exclude internal traffic, build a reusable "high-value customers" segment, and specify time windows like "MTD" or "last full quarter".
  • Clear filter/segment specs reduce rework, align teams, and make dashboards consistent across tools.

Note: The quick test is available to everyone. Progress is saved only if you are logged in.

Concept explained simply

• Filter: a rule that includes or excludes records for a query or visualization (e.g., country = "DE", date between Jan 1–31).
• Segment: a labeled, reusable group defined by logic (e.g., "High LTV customers" or "New users last 30 days"). A segment can be applied as a filter later.

Mental model

Think of a funnel with three gates:

  1. Row-level gates (dimension filters): choose which raw rows enter (e.g., event_name = "purchase").
  2. Aggregation: compute metrics (e.g., SUM(revenue) by region).
  3. Post-aggregation gates (measure filters): keep or drop groups based on metrics (e.g., only regions where SUM(revenue) > 10,000).
Common clarifications you must confirm
  • Time: fixed vs relative dates, time zone, calendar type (calendar month vs fiscal month).
  • Logic: AND vs OR between rules, inclusion vs exclusion, null handling.
  • Levels: row-level filter vs post-aggregation filter (HAVING), and which entity level (order, user, session).
  • Definitions: exact meaning of "active", "new", "test traffic", and list membership (e.g., what counts as EU?).
  • Reusability: one-off filter vs named segment others can reuse.

Worked examples

Example 1: "Active subscribers in EU last quarter"

Ambiguity: What is "active"? Which countries are in EU? What is "last quarter" and time zone?

Step 1 — Time: Last full calendar quarter in UTC? If today is 15 May, last full quarter is Jan–Mar (inclusive). Confirm time zone for date fields.
Step 2 — Geography: Provide explicit EU ISO2 list at the time of reporting (e.g., AT, BE, BG, HR, CY, CZ, DE, DK, EE, ES, FI, FR, GR, HU, IE, IT, LT, LU, LV, MT, NL, PL, PT, RO, SE, SI, SK). Confirm handling of GB, NO, CH.
Step 3 — Active: Define as "has at least 1 successful subscription payment in the quarter" OR "status = 'active' as of quarter end". Pick one and document.
Resulting spec (sample)
  • Date filter: subscription_payment_date in last full calendar quarter (UTC).
  • Geo filter: billing_country in {AT, BE, BG, HR, CY, CZ, DE, DK, EE, ES, FI, FR, GR, HU, IE, IT, LT, LU, LV, MT, NL, PL, PT, RO, SE, SI, SK}.
  • Active definition: user_id with COUNT(successful_subscription_payments) >= 1 during the quarter.
  • Aggregation level: distinct user_id count.

Example 2: "Exclude internal traffic"

Ambiguity: Which IPs/domains? Logged-in staff only? What about staging environments?

Step 1 — Sources: Internal traffic includes IP ranges 10.0.0.0/8 and 192.168.0.0/16, and user_email domains ending with "@company.com"; exclude events where env = "staging".
Step 2 — Priority: If both IP and email present, exclusion applies if either matches (OR).
Step 3 — Nulls: If IP is null and email domain unknown, do not exclude.
Resulting spec (sample)
  • Filter: exclude where ip_in_internal_ranges = true OR email_domain = "company.com" OR environment = "staging".
  • Apply at: row-level (events) before aggregations.

Example 3: "High-value customers" segment

Ambiguity: Threshold, currency, period, refunds handling.

Step 1 — Metric: LTV = SUM(net_revenue) per user over lifetime; net_revenue = gross_revenue - refunds - discounts.
Step 2 — Threshold and currency: LTV >= 500 in USD equivalent, FX rate from monthly close rates; compare in reporting currency.
Step 3 — Reusability: Save as reusable segment: segment_high_value_customers_v1 with versioning.
Resulting spec (sample)
  • Segment logic: include user_id where lifetime_net_revenue_usd >= 500.
  • Refund handling: exclude refunded amounts from revenue at transaction date.
  • Nulls: if no transactions, user not included.

Steps to clarify any filter/segment

  1. Pin the time window
  2. Name the entity and level: user, session, order, product
  3. Separate row-level vs post-aggregation filters
  4. Write inclusion/exclusion logic with AND/OR
  5. Specify null handling
  6. Lock the lists: regions, channels, statuses
  7. Decide reusability: ad-hoc filter or named segment
  8. Write acceptance checks: small samples you can verify

Exercises and practice checklist

Do these exercises here and in the Exercises panel below.

Exercise 1: Define filters + a segment

Request: "Show active subscribers in EU last quarter and create a 'high-risk churners' segment for future use." Produce a written, testable spec with all clarifications.

Exercise 2: Post-aggregation vs row filter

Request: "Top 10 products by revenue last 30 days, excluding refunds, but only count orders with AOV > 50." Specify exactly how to filter and rank.

Practice checklist

Common mistakes and self-check

  • Mistake: Using "last month" but including the current partial month. Self-check: Did you say "last full calendar month"?
  • Mistake: Mixing OR and AND implicitly. Self-check: Did you add parentheses to group logic?
  • Mistake: Filtering on aggregated metrics as if they were row-level. Self-check: Does your BI tool support post-aggregation (HAVING) for that visual?
  • Mistake: Ignoring time zone misalignment. Self-check: Are all timestamps converted to the reporting zone?
  • Mistake: Forgetting nulls. Self-check: What happens to rows with null country/channel?
  • Mistake: Unversioned reusable logic. Self-check: Did you add a version suffix to named segments?

Practical projects

  • Define and implement a "New customers" segment with 3 alternative definitions; compare outputs and document the chosen one.
  • Build a dashboard tile using a measure filter (post-aggregation) and document how it differs from a row-level equivalent.
  • Create an "Internal traffic" exclusion rule that combines IP ranges, user roles, and environments; validate with sample data.

Mini challenge

Draft a one-paragraph spec for "Weekly active users by region — last 8 weeks, exclude bots" that includes: time window definition, entity level, bot exclusion rules, and whether regions with zero users should appear.

Who this is for

BI Developers, Analytics Engineers, and Data/BI Analysts who translate business questions into reliable dashboards and datasets.

Prerequisites

  • Basic SQL (WHERE vs HAVING, GROUP BY)
  • Familiarity with your BI tool's filter types and time functions
  • Understanding of core business entities (users, orders, sessions)

Learning path

  1. Clarify time and entity levels consistently
  2. Master row-level vs post-aggregation filters
  3. Define and version reusable segments
  4. Practice acceptance checks and edge cases

Next steps

  • Complete the exercises below
  • Take the quick test to confirm understanding
  • Apply the checklist to your next stakeholder request

Practice Exercises

2 exercises to complete

Instructions

Stakeholder says: "Show active subscribers in EU last quarter and create a 'high-risk churners' segment for later."

  1. Write a precise, testable spec for the chart (filters, entity level, aggregation, null handling).
  2. Propose a reusable segment "high-risk churners" with exact logic and version name.
  3. List 2 acceptance checks to validate correctness.
Expected Output
A written specification including: time window (last full calendar quarter, time zone specified), EU country list, active definition, aggregation level, null handling. A segment definition with exact churn risk rules and a versioned name. Two acceptance checks with sample counts or boundary tests.

Clarifying Filters And Segments — Quick Test

Test your knowledge with 8 questions. Pass with 70% or higher.

8 questions70% to pass

Have questions about Clarifying Filters And Segments?

AI Assistant

Ask questions about this tool