AndroidAL
AndroidAL

Reputation: 1119

Return dates that are within 1,3,6,12 months from todays date SSRS/Expression

I have a table with the following columns:
Sales | Name | Est.close Date

I'm able to display all dates on one table,
I have created 4 tables , for est. close date next month, 3 , 6, 12 months, what I'm trying to do is display dates that are within 1, 3, 6 and 12 months of today.

I have tried ;

=DateAdd(DateInterval.Month, 6, Parameters!estimateclosedate.Value)

And

=DateAdd(DateInterval.Day, -1 * DatePart(DateInterval.WeekDay,Today()) + 6, Today())

Any help , would be greatly appreciated.Thanks

UPDATE:
I have 2 dates Today() and Fields!estimatedclosedate.Value. What I'm trying to do is return estimatedclosedates that are within 1,3,6 and 12 months from today. enter image description here

UPDATE 2: I have tried

=Fields!estimatedclosedate.Value <> DATEADD(DateInterval.Month,1,Today())

but, this turns a boolean , TRUE.

Upvotes: 0

Views: 5698

Answers (1)

Indian
Indian

Reputation: 527

If you want to show data in different tablixes you should set filter on each tablix.

For example:

tablix filter

In Value for each filter you should set such expressions:

=dateadd(DateInterval.Month, 1, DateTime.Today)

=dateadd(DateInterval.Month, 3, DateTime.Today)

=dateadd(DateInterval.Month, 6, DateTime.Today)

=dateadd(DateInterval.Month, 12, DateTime.Today)

EDIT (after comments)

Try to use this expression in exression field:

=CDate(Fields!estimatedclosedate.Value)

It will solve the problem with date format when convert DateTime to String.

Upvotes: 2

Related Questions