cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic date range creation for WebI query

Former Member
0 Kudos

Hi

I have a webi query where I need to provide a date range as selection. But the from date will be based on number of days that user will provide during query execution. For e.g. user will give no of days as 10 so the date range need to be created as (system date -10) to (system date).

I am not sure how to provide the option for user to input no of days and then calculate the date range.

Could you please help me here.

Regards,

Amit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Amit.

it can be done but by creating multiple objects.

create Obj1: @prompt("Enter Number Of days",N,Mono,etc..) and capture the number of days in it.

Create your second object infact a filter object: Obj2: Sysdate

Third Object(filter) Obj3: (Sysdate-(@select(class\Obj1)))

give the between condition in webi using these two objects

between Obj2 and Obj3

Answers (1)

Answers (1)

Former Member
0 Kudos

Create a predefined condition along the lines of:

calendar_dim.calendar_date between trunc(sysdate)-@Prompt('Please enter number of days to go back',N,,mono) and trunc(sysdate)

You can then simply include this in any report and it will filter the date according to the number you enter