Solved

Report Builder 3.0 Expression to calculate total "Outstanding" based on specific "Status"

Posted on 2016-10-31
3
81 Views
Last Modified: 2016-11-02
Hi,

I have a matrix report where the columns are grouped on the 'Status' field. There are 3 statuses in my data, Recalled, Returned and Transferred. I have added an expression in the "Outstanding" column to calculate the total in the "Requested" column MINUS the count in the "Status" column. I want the "Outstanding" column to calculate only the number of "Transferred". Currently the Outstanding column only take the requested number from whichever status is in the last column of the matrix. This is fine when the status is sorted A to Z, however I have been asked to show the "Transferred" in the first column. The image shows the matrix design, followed by how the 'Outstanding' is calculated off the "Transferred" when it is is the last column. The 3rd image shows how the "Outstanding" is now calculating off the 'Recalled' status, as it is the last column. I am trying to work out an expression that will show 'Requested MINUS Status' ONLY when the status is "Transferred", no matter which sort order is used.

Matrix design followed by output sorting A-Z and Z-A
Thanks in advance for any assistance you can give Experts!!

Lloyd
0
Comment
Question by:lawright17
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 29

Expert Comment

by:Pawan Kumar
ID: 41867910
Can you provide the expression ?
0
 
LVL 16

Accepted Solution

by:
Megan Brooks earned 500 total points
ID: 41867912
The simplest general solution I can think of is to add an integer calculated field to the dataset that has the value of the 'status' count if the status is 'transferred' and zero otherwise. When you sum the value of this new field over all the status column values in one row of report output, the result will be the the 'Transferred' value only.

Calculated field expression (call it 'TransferredOnly' or whatever you'd like):
=IIf(<test for status = transferred>, Fields!<status value field name>.Value, 0)
'Outstanding' column expression:
=Fields!<requested value field name>.Value - SUM(Fields!TransferredOnly.Value)
This will find the result no matter where 'Transferred' appears, if it appears at all, or even if it occurs more than once in a row (although I assume that it won't).
0
 

Author Closing Comment

by:lawright17
ID: 41871197
Thanks so much Megan! That has got my report showing exactly how we want it!
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you'll probably know, a data region in a SQL Server Reporting Services report can be linked to only one dataset.  This makes it troublesome when you need to display data from more than one dataset in the same data region.  SQL Serve…
Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question