on 06-29-2010 10:43 AM
Dear experts,
I have a client requirement for a webi report where user must enter a year (e.g. 2010) and the report must return that year and previous (e.g. 2010 and 2009).
How do I create that offset? Must it be defined directly in the universe or can I create it only in the webi report.
Thanks for your help.
Inê
HI,
You could do it easily in the universe.
Create the objetc with the below condition in the where clause,
Where clause:
Year in ( @prompt(user in put year),@prompt(user in put year-1))
This condition will give you data for two years for ex: user input is 2010 and the values passed in the prompt will be 2010 and 2009,hence you will get the data for two years.
I hope this will help you.
Cheers,
Ravichandra K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may find a between to be more efficient than IN or the OR clause that you have. Talk to your DBA and ask them for help to understand which of the following performs the best:
table.year IN (@Prompt('Year')-1, @Prompt('Year'))
or
table.year = @Prompt('Year')-1 or table.year = @Prompt('Year')
or
table.year between @Prompt('Year')-1 and @Prompt('Year')
I would be curious to know what their answer is.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.