How to apply filter on creation date while creating report in rational insight
We have created report by using report studio however stuck where we have to apply filter on creation date.
Please suggest us how do we can proceed with this.
Thanks and regards,
Accepted answer
to filter the query on the current date you can do the following:
- In report studio open the query that populates your report
- From the Toolbox drag and drop a Filter item to the Detail Filters section
- Use this expression for the filter: cast ([Creation Date], date) = current_date
Basically you transform the Creation Date from Timestamp to date format (using cast) and compare it with current_date that returns the date of Today.
Here a screenshot for reference:
Best Regards,
Francesco Chiossi
Comments
Thank you so much Francesco.... it works fine now :)
1 vote
Hi Francesco , this was a great help to me also as I needed the same filter for my report. Also will an ORĀ filter have to be added along with cast([Resolution Date],date) = current_date to pick up work items closed or open on the current date? Also in your above example can you explain what the "creation date" and "creation date only" attributes are for , why do you have two?
1 vote
One other answer
I'm glad you found it useful.
Yes, my was just a conceptual example, if you want to list both open and closed work items on the same query you would need an or condition.
Concerning my example:
- [Creation Date] = [Business View].[Request].[Creation Date]
-
[Creation Date only] = cast ([Creation Date], date)
- [Today] = current_date
I found it useful to build my filters from pieces I create in separate data items, so I can see the values of the expressions that I want to compare, for debugging purpose. Of course [Creation Date only] and [Today] can be safely removed from the production report.
Best Regards,
Francesco Chiossi