Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Conditional expresssion in Matrix detail cell

Posted on 2011-02-22
2
Medium Priority
?
557 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 2000 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

972 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