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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Report Builder Nested SUM ( IIF Question

I am new to SSRS and have a SUM(IIF question.

 

My data set contains four columns: Date, GroupID, PlanPaid, and NetworkIndicator.

 

Here is an example of the data set:

Capture.PNG

 

I am trying to SUM the [PlanPaid] amount when [NetworkIndicator] = "In Network".

 

However, I need this amount broken up by the [Date]. I tried accomplishing this by creating the expression:

=Sum(IIf(Fields!NetworkIndicator.Value = "In Network" , Fields!PlanPaid.Value , Nothing) , "Claims_Rolling12")

 

But this expression returns the same amount across all [Dates]:

Capture2.PNG

 

How do I break it up so that it is grouped by the correct [Date]?  I want it to return this:

Capture3.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I think you can try this code to achieve your goal.

=sum(VAL(IIF( Fields!NetworkIndicator.Value = "In Network", Fields!PlanPaid.Value, Nothing)))

Result is as below.

RicoZhou_0-1649668071204.png

 

Best Regards,
Rico Zhou

 

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 @Anonymous ,

 

I think you can try this code to achieve your goal.

=sum(VAL(IIF( Fields!NetworkIndicator.Value = "In Network", Fields!PlanPaid.Value, Nothing)))

Result is as below.

RicoZhou_0-1649668071204.png

 

Best Regards,
Rico Zhou

 

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

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors