It's all about the answers!

Ask a question

How to apply filter on creation date while creating report in rational insight


Suyash adsul (91218) | asked May 26 '14, 6:32 a.m.
edited May 26 '14, 8:41 a.m. by Francesco Chiossi (5.7k11119)
We have created WI query (All defects closed Today, All defects raised Today) and based on that we want to create report in rational insight with same query result and want to daily send mail to project manager.

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


permanent link
Francesco Chiossi (5.7k11119) | answered May 26 '14, 8:07 a.m.
Hello Suyash,

to filter the query on the current date you can do the following:
  1. In report studio open the query that populates your report
  2. From the Toolbox drag and drop a Filter item to the Detail Filters section
  3. 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

Suyash adsul selected this answer as the correct answer

Comments
1
Suyash adsul commented May 27 '14, 3:43 a.m.

Thank you so much Francesco.... it works fine now :)


1
Brandy Guillory commented May 27 '14, 4:45 p.m. | edited May 27 '14, 4:46 p.m.

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?

One other answer



permanent link
Francesco Chiossi (5.7k11119) | answered May 28 '14, 5:30 a.m.
edited May 28 '14, 5:35 a.m.
Hello Brandy,

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

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.