2 Replies Latest reply: Mar 18, 2014 7:45 AM by Luca V

# Last value based on "till-time filter"

Hi everybody,

i have 2 question:

1)  does exist a time filter where i can set a range of time ? I have a table with fields "YEAR" and "MONTH" and others. I would set  a year and month ( for example 2014  - 5 ) and having all the value of the table that have  YEAR and MONTH <= 2014/05

2) Same table of the previous question :

YEAR, MONTH , PARK , VALUE
2000,  11,  1  , 10
2000,  12,  1  , 12
2001,  1,   1  , 11

2000 , 12 , 2 ,  45

2005,  5,   2  , 109

2005,  6,   2  , 128

2005,  7,   2  , 117

2000 , 12,  3,   150

2010,  12,  3  , 10

2011,  1,   3  , 12

2011,  2,   3  , 11

];

i would like :

- set a time filter

- a table that show the last value of field VALUE (PARK as dimension)

Examples :

TIME FILTER : 2002/05

PARK 1 :  VALUE 11 (last date < 2002/05 is 2001/01 so i take that value)

PARK 2 : VALUE 45 (last date < 2002/05 is 2000/12 so i take that value)

PARK 3 : VALUE 150 (last date < 2002/05 is 2000/12 so i take that value)

TIME FILTER : 2005/06

PARK 1 :  VALUE 11 (last date < 2005/06 is 2001/01 so i take that value)

PARK 2 : VALUE 128 (last date < 2005/06 is 2005/06 so i take that value)

PARK 3 : VALUE 150 (last date < 2005/06 is 2000/12 so i take that value)

Is that possible ?

Thanks

• ###### Re: Last value based on "till-time filter"

May be like attached sample

• ###### Re: Last value based on "till-time filter"

Hi tresesco,

in your example if i set a time filter (ex. 2011-05) the table show only the value that have YEAR = 2012 and MONTH = 5. If a PARK doesn't have a value in 2012-05 i would select the most recent VALUE (ex. PARK 1 have a value in 2011-01 and a value in 2013-05: the filter 2011-05 should show the value in data 2011-01 of PARK 1)