Trouble with parameter dates for retrieving report data

I am currently creating a report with a time series chart that I need to read data from the first of current month to the current day of month. For example todays would read the average from October 1st through October 11th and tomorrow it will read the 12th and so on until November 1st it will reset and start with that month.

So you've said what you're trying to accomplish, and you're title makes it clear that you are having some issue with parameters, but there isn't really enough information to help you.

What issue are you having trouble solving? What did you try, and what happened?

I put in a StartDate parameter that states getDate(getYear(now()), getMonth(now()), 1) sorry I’m very new to this and I am trying to get the chart to read data for the Month to Date and I’m getting no error when I go to preview it but my X axis isn’t reflecting what I need it to, it’s showing the end date at the end which appears to be correct but my start date is not appearing on the chart

  1. That is an expression, and while they often look the same, it is not the same as a script, so be careful not to confuse them.
  2. That expression should definitely return the first day of the month, so I don't see a problem there.
  3. Where are you testing this? You have said that you are creating a report, but I just want to insure that you are actually using the Reporting Module, and not creating a perspective view and calling it a report.
1 Like

Yes it is indeed in the reporting module

And it may be getting the correct data and my X axis isn’t reflecting that and the issue could be with the axis itself and not my expression

So, I am assuming that the issue you are seeing is in the Preview Tab of the report editor, and that the expression you have shown, was actually entered in the Data tab of the report editor.

Unless you are doing something special, the domain axis will set it's range to the dates provided in the data, based on the column name you entered in the Domain Key attribute of the Chart Options.

In the preview tab, on the right side do see the expected dates? Also, depending on the amount of data, it might be limited. In your data tab on the right side if you have a data source selected there is an option to limit the data in preview, this could be truncating the returned data so that it looks like you are getting the wrong amount of data but really it's just because those records fall outside of the limit.