Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
checkstatap
Frequent Visitor

Dax Formula to Count while excluding 0 values

Hi All, 

 

I am trying to find the equivilent to the below sum function, however removing 0 values. 

 

Rev = Calculate(SUM(Table[Column]),'Table 2'[Column 2]="Filter")

 

Count= Calculate(SUM(Table[Column]),'Table 2'[Column 2]="Filter")  ----Would I add in COUNT ------then, "<>0"?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @checkstatap ,

 

To calculate the sum of a column in Power BI and remove 0 values, you can use the following formula:

 

Rev = CALCULATE(SUM(Table[Column]), 'Table 2'[Column 2] = "Filter", Table[Column] <> 0)

 

This formula uses the `CALCULATE` function to filter the table based on the condition `'Table 2'[Column 2] = "Filter"` and then sums the values in the `Table[Column]` column that are not equal to 0.

 

If you want to count the number of non-zero values in the same column, you can use the following formula:

 

Count = CALCULATE(COUNT(Table[Column]), 'Table 2'[Column 2] = "Filter", Table[Column] <> 0)

 

This formula uses the `CALCULATE` function to filter the table based on the condition `'Table 2'[Column 2] = "Filter"` and then counts the number of values in the `Table[Column]` column that are not equal to 0.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @checkstatap ,

 

To calculate the sum of a column in Power BI and remove 0 values, you can use the following formula:

 

Rev = CALCULATE(SUM(Table[Column]), 'Table 2'[Column 2] = "Filter", Table[Column] <> 0)

 

This formula uses the `CALCULATE` function to filter the table based on the condition `'Table 2'[Column 2] = "Filter"` and then sums the values in the `Table[Column]` column that are not equal to 0.

 

If you want to count the number of non-zero values in the same column, you can use the following formula:

 

Count = CALCULATE(COUNT(Table[Column]), 'Table 2'[Column 2] = "Filter", Table[Column] <> 0)

 

This formula uses the `CALCULATE` function to filter the table based on the condition `'Table 2'[Column 2] = "Filter"` and then counts the number of values in the `Table[Column]` column that are not equal to 0.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.