Calculation Issues

Create a DAX Measure to Sum Actual Values When Active Is Greater Than Zero

Chanuka GeekiyanageChanuka Geekiyanage Dec 2, 2026 869 views

Question details

Create a DAX measure that calculates Actual only when Active is greater than zero, with appropriate totals.

Sum Actual Values When Active Is Greater Than Zero with DAX
Product
Power Pivot for Excel or Power BI
Device & OS
not provided
Scenario
The user wants to display conditional Actual values in a PivotTable or Power BI visual.
Observed behavior
The desired result includes Actual values only for qualifying rows or groups and totals them consistently.
Before you start

Check whether Active is a column or a measure, and identify the column that defines each group to be tested. Confirm that an [Actual] measure already exists, or create one that sums the appropriate Actual column.

Solution 1Recommended

Filter Actual by an Active column

Use this approach when each row has an Active column and only rows with a positive Active value should contribute.

1
Create the Actual measure

In Power BI, select Modeling > New measure; in Excel, open Power Pivot and use Home > Measures > New Measure. If needed, enter Actual = SUM(Table1[Actual]) and replace the table and column names with your own.

2
Add the filtered measure

Create another measure using: Actual Active = CALCULATE([Actual], Table1[Active] > 0). Replace Table1[Active] with your Active column.

3
Check the total

Add Actual Active to the Values area of your PivotTable or Power BI visual. Test the detail rows and grand total against the underlying rows with Active greater than zero.

Filter Actual by an Active column
Existing Active filters: The filter in CALCULATE normally replaces an existing filter on the same Active column. To intersect with existing filters instead, use CALCULATE([Actual], KEEPFILTERS(Table1[Active] > 0)).
Free Microsoft Office alternative

Work with spreadsheet data in WPS Office

WPS Office is a free, lightweight alternative for working with spreadsheet data in a familiar interface. Open compatible Excel files to continue everyday spreadsheet work, but use Power Pivot or Power BI for the DAX measures described here.

Review and organize the Actual and Active data used in spreadsheet calculationsOpen and edit compatible Microsoft Excel XLSX filesUse a familiar spreadsheet interface for an easier transitionWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

How do I know which DAX formula to use?

Use CALCULATE([Actual], Table1[Active] > 0) when Active is a column and the condition applies to rows. If Active is a measure evaluated per group, use SUMX over the group column and test [Active] for each group.

Why does the grand total differ from the sum of visible rows?

A DAX measure is recalculated in the total's filter context rather than automatically adding visible results. To sum qualifying group results, use SUMX over VALUES of the grouping column and evaluate the condition inside the iterator.

What if I do not already have an Actual measure?

Create one with Modeling > New measure in Power BI or Home > Measures > New Measure in Power Pivot. For example, use Actual = SUM(Table1[Actual]) with your actual table and column names.

Does the column filter preserve an existing filter on Active?

A direct CALCULATE filter normally replaces an existing filter on the same column. Use KEEPFILTERS(Table1[Active] > 0) inside CALCULATE when the positive-value condition should intersect with the existing filter.