Skip to Content
author's profile photo
Former Member

Using currentdate() on webi query


there is a requirement for all the reports in WEBI documents to be restricted by a date filter. So this date field needs to be restricted using CurrentDate() ...system variable. Is this possible at all in WEBI? If yes, how can this be used?


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Posted on Jan 07, 2015 at 12:26 AM

    The easiest way to do this might be to create a filter in the Universe (UNX) within the IDT tool.

    Here are some high level steps:

    1) Edit the Business Layer of your universe and add a new Filter

    2) Use something like the following in the WHERE clause of the filter:

    convert(DATE, table.dateobject) = convert (DATE, {fn CURDATE()})

    3) Save the filter and use it within your Webi documents that you want to filter on the Current date.

    You could also edit the SQL of your Webi documents and customize the Where clause to include a similar Where clause that filtered on your date dimension.

    For SQL Server, I used CURDATE() to get the current date, for your database, it might be a different DB function. You'll have to check your documentation.

    Other than that, there isn't an out of the box way to do this that I can think of. I know there have been a few ideas (enhancements) submitted around this here:

    I'd recommend finding one that matches your need and up-voting it. Or adding a new idea if you don't find one that fits your needs exactly.



    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Jan 08, 2015 at 02:35 AM

    Thanks JB... we went with the getting the date on the Universe itself ...editing the SQL for the webi was also a good option, will keep that in mind for future.

    Add comment
    10|10000 characters needed characters exceeded