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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
AW1976NOVA
Post Patron
Post Patron

SSRS Nested SUM ( IIF Expression Need to Group By Date Please Help

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
AlexisOlson
Super User
Super User

Adding the "Claims_Rolling12" argument means that it's summing over that context instead of just the local context.

 

In this case, I think you can stick with just Sum(Fields!PlanPaid.Value) and put a NetworkIndicator filter on the entire Tablix.

AlexisOlson_0-1649275847507.png

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

Adding the "Claims_Rolling12" argument means that it's summing over that context instead of just the local context.

 

In this case, I think you can stick with just Sum(Fields!PlanPaid.Value) and put a NetworkIndicator filter on the entire Tablix.

AlexisOlson_0-1649275847507.png

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.