Sunday, February 19, 2012

Display only the latest two consecutive years?

Hi all,

I have a Matrix with several static rows of financial information with a column group that groups the information by date:
01.02.04 12.09.03
Dividend 455,789 346,098
Profit 100,787 264,687
Deposits 89,078 76,003
Currently I have a filter on the column group that limits the information to the top two dates (Fields!dateField.Value Top N =2). What I also need is to filer the data so that only consecutive years are displayed. I have tried the filter (Year(Fields!dateField.Value) >= Year(Max(Fields!dateField.Value)) - 1), but this doesn't stop non-consecutive years being added to the Matrix. What am I missing here?
Any help you have to offer is much appreciated!
Thank you,
Stephen.

stephen,

i think that this task seems to be "database work" - just evoke the needed data by an appropriate sql-statement.

cheers
markus

|||

Thank you for your reply.

Is there any way that I can do this without altering the underlying dataset? Unfortunately, the query already returns all of the data that is required and nothing more, so limiting any of the data there would cause problems elsewhere in the report.

Stephen.

|||How about creating a second dataset with a modified query to get only the data you need. So then you have one dataset with all the dataand one with the last two years.|||That's a good idea! I will have a play around with it and will let you know how I get on.

Thanks!

Regards,

Stephen.|||

That seems to have done the trick!

Thanks!

Stephen.

No comments:

Post a Comment