on 07-27-2016 4:45 AM
You have couple of options! What you can do is create a filter at the universe level with the below code, which will serve the purpose:
"Database date field" > add_months(trunc(sysdate),-12)
Or
at the webi report create a filter variable:
[filter]=if([Date]>Relativedate(Currentdate();-365)) then "Show" else hide
Set the variable to "Show"
P.S: Creating the filter at universe level is a best practice.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have these two fields in universe so how will I write universe filter to get only rolling 12 months of data
[Report Year] = [2016,2015,2014,2013] - datatype Numeric
[Report Month] = [1,2,3,4,5,6,7,8,9,10,11,12] - datatype Numeric
[Profit]
[Product]
I dont have a date field but separate [Report Year] & Month
This will be filter on what sales?
Report Year | Report Month | Product | Sales | |
2015 | 1 | ABC | 123 | |
2015 | 2 | XYZ | 345 | |
2015 | 3 | ABC | 567 | |
2015 | 4 | CVB | 789 | |
2015 | 5 | DFG | 1011 | |
2015 | 6 | DFG | 1233 | |
2015 | 7 | RTY | 1455 | Rolling 12 months start |
2015 | 8 | UUI | 1677 | |
2015 | 9 | oiu | 1899 | |
2015 | 10 | kjh | 2121 | |
2015 | 11 | lkj | 2343 | |
2015 | 12 | mnb | 2565 | |
2016 | 1 | mnb | 2787 | |
2016 | 2 | poi | 3009 | |
2016 | 3 | qwe | 3231 | |
2016 | 4 | cft | 3453 | |
2016 | 5 | vgy | 3675 | |
2016 | 6 | bhu | 3897 | |
2016 | 7 | nji | 4119 | Rolling 12 months end |
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
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.