Solved

Conditional expresssion in Matrix detail cell

Posted on 2011-02-22
2
544 Views
Last Modified: 2012-05-11
I am using SSRS 2008 and currently working on a matrix report with one column group and one row group. The column group has Month Names and the row group has product names. The detail cells in the matrix show the sales amounts for the products by months. I have a need that for the first month column in the matrix, the sales amounts need to have a different expression than the rest of the months. For ex: lets say, for the first month column, the sales amount needs tobe multiplied by 0.8 and for the subsequent months, show the sales amount as is from the dataset. How can I write an expresssion in the detail cell to conditionally identify the first column value in the matrix vs the rest? Need a sample expression that I can look at. (The above is an example scenario and so I am not looking at solutions to do this in the sql stored procs)
0
Comment
Question by:kamur
2 Comments
 
LVL 27

Accepted Solution

by:
planocz earned 500 total points
ID: 34954032
Try something like this....

=IIF(First(Fields!MyData.Value=True,(CDbl(Fields!MyData.Value) * .8), Fields!MyData.Value)
0
 

Author Closing Comment

by:kamur
ID: 34955283
Thank You planocz, it really helps. I have opened another question along the same lines for SSRS Matrix report.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now