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
jdubs
Helper V
Helper V

Calculated field to SUM with NULL data and multiple conditions?

I'm actually trying to so this is SSRS but was hoping someone could help here?

 

I am trying to SUM a column based on a condition but it is throwing an #error when it finds any row with NULL data.

 

What I thought would work is : =IIF(IsNothing(Fields!DollarValue.Value), 0, IIF(Fields!conditionValue.Value = "1", Fields!DollarvalueValue.Value,0))

 

       where, DollarValue = the column that contains NULL rows and conditionValue = the condition I want to filter the rows on

1 ACCEPTED SOLUTION
jdubs
Helper V
Helper V

Aaaand, of course as soon as I posted this I figured it out. Needed to specify "Nothing", instead of "0" for the true and false values. 

 

 

View solution in original post

2 REPLIES 2
sri121
New Member

There is triky situation where in the matrix if you don't have value for the combination and need to display 0 

 

=iif(sum(Fields!BudgetAmount.Value)=nothing,0,sum(Fields!BudgetAmount.Value))

jdubs
Helper V
Helper V

Aaaand, of course as soon as I posted this I figured it out. Needed to specify "Nothing", instead of "0" for the true and false values. 

 

 

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.

Top Solution Authors