on 08-08-2013 9:08 PM
Hi,
I need to create a object to bring recent 3 of data from a date object.
Actual Data
Report_Year_Month |
---|
201212 |
201301 |
201302 |
201303 |
201304 |
201305 |
201306 |
201307 |
Expecting
Recent 3 Months |
---|
201305 |
201306 |
201307 |
I tried to get hte expected by floowing way of no use.
Recent 3 Month==> add_months(to_date(Report_Year_Month ,'YYYYMM'),-1)
What i am getting is "201305"
Please give some sugessions to get recent 3 months.
Environment BO XI R3
Thanks.
Create a predefined condition in the universe as:
table.date BETWEEN add_months(trunc(sysdate,'mm')-3) AND trunc(sysdate,'mm')-1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
If you looking for report Year Month restricted for last three month excluding current month then below would be your universe object.
LastMonthYear=Case When Month(SysDate)=01 Then Year(SysDate)-1 Else Year(SysDate) End
LastMonth=Case When Month(SysDate)=01 Then 12 Else Month(SysDate) End
LastMonthYYYYMM=To_date(@Select(ABC\LastMonthYear)+@Select(ABC\LastMonth);"YYYYMM")
Create condition object as below and use it in the report to restrict data in report for Last 2 Report year months.
=Report_Year_Month Between add_months(@Select(ABC\LastMonthYYYYMM),-2) and @Select(ABC\LastMonthYYYYMM)
Thanks
Mallik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.