Solved

Conditional expresssion in Matrix detail cell

Posted on 2011-02-22
2
547 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

920 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

15 Experts available now in Live!

Get 1:1 Help Now