Solved

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

Posted on 2016-10-31
3
64 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 28

Expert Comment

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

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Security manage in SSRS 1 82
VB.Net - ReportViewer Windows Form many reports 2 39
SSRS troubles 4 84
SSRS Deployment problem 5 96
In this short article I will be talking about two functions in the SQL Server Reporting Services (SSRS) function stack.  Those functions are IIF() and Switch().  And I'll be showing you how easy it is to add an Else part to the Switch function. T…
Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

733 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