Saturday, October 6, 2012

SSRS Tips and Tricks - Conditionally Summing Group Totals

Dear All,

Hope you are doing good. It's been a while since I have written some posts. I have lots of things to write about, but just not able to manage my time. Have been busy working on different areas:
a. Installing and configuring Sharepoint 2010 Setup with SQL Server 2012
b. Configuring SSRS 2012 Sharepoint Integrated Mode
c. Dynamics AX and Faxing
d. Configuring Remote Blob Storage in SQL Server 2012

I will be soon covering these areas in different posts as I have learned quite interesting things in my journey.

However, thought to start with a small tip on one of the powerful functions in SSRS Reporting. E.g. My requirement was to sum a group total conditionally.

So, we can use a conditional iif() within a sum() within an expression as shown below:

=Sum(iif(Fields!Status.value = "ValueA", Cdbl(Fields!Payment.Value), 0.0))

No comments:

Post a Comment