I have done this before and can't seem to figure it out now. I have a bar chart with date on the X axis and a dollar amount for each date as the bar. I would like to be able to show only the last 30 days programmatically. I believe this is the Series Properties > Visibility property. I am using the following formula in the expression for that property:
=iif(Fields!PayDate.Value>=Parameters!StartDate.Value, true, false)
It's showing all points regardless of whether the PayDate is greater or less than the date specified by the user in the parameter. This is coming from a database and the PayDate field is truly a date data type, the X axis is scalar, not category (as I believe it should be). Any idea how to achieve this?
In case you're wondering, I don't want to filter using a parameter in the database query because I have a calculated series that is a moving average over 7 days. If you don't have data from 7 days prior to your first date it won't show the moving average. Thus, I just hide the time span rather than not returning it in the query.