Wrong deals enter a conditional pipeline sum when ungrouped AND and OR conditions make a required filter optional; Metabase advises parentheses around each group.
Direct answer: why your sum includes wrong deals
Without parentheses, an ungrouped alternative can make a required condition optional according to Metabase. This structural issue alters which records enter the calculation. Your pipeline amount reflects every deal that passes the current expression logic. If the expression treats a date filter as one option among many rather than a mandatory gate, unrelated deals join the sum. For a related date check, see Close date change log: why the date moved. Inspect the selection expression behind today's pipeline amount and confirm that every alternative remains subject to the intended required condition. Verify that each logical group is explicitly enclosed before presenting coverage figures to the revenue leader.
Key takeaways: four checks before you present the total
Check these four specific errors before presenting your filtered pipeline amount:
- First, verify you are not using ordinary addition instead of conditional logic; SUM adds every cell in its range according to Google.
- Second, ensure your selection conditions are properly grouped. Make it a habit to put parentheses around AND and OR groups to avoid making required conditions optional according to Metabase.
- Third, inspect imported columns carefully, because the order you list column indices in does not set the output order according to pandas.
- Fourth, confirm numeric precision settings before you trust the total according to PostgreSQL.
Reviewing these distinct behaviors prevents accidental inclusion of unqualified deals in your coverage calculation.
During calculation: separate ordinary sums from conditional sums
In Google Sheets, the distinction between a plain total and a filtered total determines which deals appear in your pipeline amount. The SUM function returns the sum of a series of numbers and/or cells according to Google. This operation includes every cell in the specified range without checking for specific criteria, so the range must hold only the intended deals. In contrast, SUMIF returns a conditional sum across a range according to Google. Using SUMIF allows you to exclude deals that do not meet a specific condition, such as a particular stage or date.
When testing these functions, be aware of how they handle single inputs. If only a single number for value1 is supplied, SUM returns value1 according to Google. This behavior can mask errors if you expect a range to be processed but provide a single scalar value instead. Additionally, the documentation notes that although SUM is specified as taking a maximum of 30 arguments, Google Sheets supports an arbitrary number of arguments for this function according to Google. While the documented limit is thirty, the practical application in Sheets does not enforce this cap, meaning you can reference many ranges or values in a single formula.
For a RevOps owner checking a filtered pipeline amount, this distinction is critical. By switching to SUMIF, you apply the selection logic directly within the calculation. Ensure your formula references the correct column for the condition and the correct column for the amount. If your spreadsheet uses multiple criteria, consider whether a simple conditional sum suffices or if more complex logic is required. The key is to match the function to your intent: use SUM for unfiltered totals and SUMIF when you need to isolate specific subsets of your pipeline before presenting coverage to the revenue leader.
During condition setup: group alternatives inside required filters
When building a pipeline total, place the conditional aggregation in the query builder's Summarize menu under Custom Expression, scrolling down if needed according to Metabase. The structure of that condition determines which deals enter the sum. If you list alternative plan selections without grouping them, the logic may treat each alternative as independent rather than part of a single selection set. For example, an expression like SumIf([Payment], ([Plan] = "Basic" OR [Plan] = "Business")) sums payments for either plan according to Metabase. However, this form does not constrain the result to a specific time period unless explicitly added.
To keep a date condition required, wrap the alternative selections in parentheses before applying the AND operator with the month filter. The documented syntax is SumIf([Payment], ([Plan] = "Basic" OR [Plan] = "Business") AND month([Date Received]) = 10) according to Metabase. Here, the parentheses ensure that both "Basic" and "Business" plans are evaluated together as one unit against the October date constraint.
Check your current expression for ungrouped OR statements. If you see multiple conditions joined by OR inside a larger AND statement, verify that parentheses enclose the OR block. This prevents a single alternative from bypassing the required date filter.
Illustrative example: grouping a plan filter
Suppose an illustrative sheet holds three deals, each with a payment of 1000. Deal 1 is Basic in month 10, deal 2 is Basic in month 9, and deal 3 is Business in month 10. The grouped expression above counts deals 1 and 3 and leaves out deal 2. Without the parentheses, the Basic test can admit deal 2 because it is not held to the month 10 filter.
During import: do not assume selected columns retain your order
Inspect the imported file structure before assigning calculation roles to specific data fields. The pandas.read_csv function reads a comma-separated values (csv) file into DataFrame, according to pandas. When selecting specific elements during this read process, element order is ignored, so usecols=[0, 1] is the same as [1, 0], according to pandas. This behavior means that listing column indices in a specific sequence does not guarantee they will appear in that sequence within the resulting dataset. A RevOps owner must verify the actual position of each column after the import completes rather than relying on the initial selection order.
The documentation also describes how to handle data types for these imported elements. You can specify data type(s) to apply to either the whole dataset or individual columns, according to pandas. If you apply a data type to the whole dataset, every column receives that same specification during the read operation. Choosing between a dataset-wide application and an individual column application depends on whether your source file contains mixed data structures that require different handling.
Before using any imported amount in a conditional sum, confirm that the column holding the monetary value is recognized as a numeric type. If the system treats a currency field as text because no explicit data type was assigned, arithmetic operations may fail or produce unexpected results. Check your import script or tool configuration to see if it automatically assigns types or if manual specification is required for accurate pipeline totals.
Review the output immediately after reading the csv file to ensure the intended columns are present and correctly typed. If the usecols parameter selected specific indices, verify that the resulting DataFrame contains exactly those elements in their expected positions. The fact that element order is ignored implies that positional assumptions made during the selection phase do not carry over to the final data structure. This requires a verification step where you map the logical meaning of each column to its actual location in the imported frame.
Before accepting the amount: inspect numeric scale and precision
When a pipeline total appears as a whole number, check whether the underlying data type dropped decimal places. The SQL standard requires a default scale of 0, which means coercion to integer precision, according to PostgreSQL. If your schema leaves the scale unspecified, fractional deal amounts may be truncated or rounded before they reach your calculation engine. This can explain why a sum of several deals with cents looks different from the raw CSV export you imported.
The maximum precision that can be explicitly specified in a numeric type declaration is 1000, according to PostgreSQL. This ceiling allows for very large numbers with significant digits after the decimal point. However, specifying a high precision does not automatically fix a mismatch if the input data was already coerced to integers during import or storage. You must verify both the storage definition and the incoming data format.
If you are using a system that follows these numeric type rules, review your table definitions before presenting coverage figures. Look for columns defined with NUMERIC or similar types and check if they include an explicit scale parameter. Compare the stored values against your source file to identify where precision was lost. This inspection step helps isolate whether the error lies in the calculation logic or the data foundation.
For other systems, consult their specific numeric type documentation. In practice, if your forecast includes small dollar amounts or weighted percentages, losing the decimal portion can shift the total enough to affect your coverage ratio presentation. Confirm that the numeric field in your reporting tool matches the precision required by your finance team. If it does not, check the database's scale behavior and declare an appropriate scale where your data needs one, then recalculate the sum.
Calculation behavior reference table by publisher
| Publisher | Documented Behavior | Source Context |
|---|---|---|
| Returns the sum of a series of numbers and/or cells. | SUM - Google Docs Editors Help | |
| Metabase | SumIf adds up the values in a column based on a condition. | SumIf - Metabase Documentation |
| pandas | Read a comma-separated values (csv) file into DataFrame. | pandas.read_csv — pandas 3.0.6 documentation |
Next step for today
Today, open the selection expression behind your pipeline amount, wrap each OR group in parentheses, and confirm the required date filter is joined to it with AND before you recalculate. For coverage reviews, see pipeline report filters.
FAQ: diagnosing a conditional pipeline amount
What causes conditional pipeline sum errors?
Ungrouped alternative conditions can make required filters optional, altering the total. Metabase advises putting parentheses around AND and OR groups to prevent this logical shift. Check your expression structure before presenting the number.
How does SUMIF differ from SUM in Google Sheets?
SUM adds a series of values, while SUMIF returns a conditional sum across a range. According to Google, SUMIF applies a specific condition to determine which cells contribute to the total. Use SUMIF when you need to filter deals by criteria like stage or date.
Does pandas preserve the column order I specify in usecols?
No, element order is ignored in the usecols parameter, according to pandas. You must verify the actual column positions after import rather than assuming your list order matches the output.
How do parentheses keep a required Metabase condition from becoming optional?
Parentheses group terms to maintain intended logical precedence. According to Metabase, wrapping AND and OR groups in parentheses avoids making required conditions optional. This habit ensures that alternative selections remain constrained by your primary date or status filters.
What default numeric scale does the SQL standard specify?
The SQL standard requires a default scale of 0, which coerces values to integer precision, according to PostgreSQL. Check how your database stores the scale if fractional amounts are truncated unexpectedly.