Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get last date for which has a value

Hi,

I have the following table:

DateProduction (meters)
01/02/2013108
02/02/2013502
03/02/2013300
04/02/20130
05/02/20130

I want to get the last date which has got a Production value (so it will be 03/02/2013 because the dates thereafter has not values). The date must be able to show in a text box.

How can I do it using a formula/expression?

Thank you in advance

1 Solution

Accepted Solutions
Not applicable
Author

Hi Hennie,

You should solve with this exèression:

Max( {<Production={">0"}>} Date)

Hope it helps

Giampiero

View solution in original post

7 Replies
vivientexier
Partner - Creator II
Partner - Creator II

Add a flag in your script (1 when Production >0),

Then your expression will be easy Max({< Flag_production_value = {1} >} Date)

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

This should do it

=Date(Max(If(Production <> 0, Date)))

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Hennie,

You should solve with this exèression:

Max( {<Production={">0"}>} Date)

Hope it helps

Giampiero

manideep78
Partner - Specialist
Partner - Specialist

Hi,

This should work, try this

=Date(Max({<Production={"<>0"}>}Date))

sushil353
Master II
Master II

hi

try this

=Date(max({<Production ={"<>0"}>} Date_t))

find the sample application

HTH

Sushil

Anonymous
Not applicable
Author

Hi ,

do the below

1.In script load date as  Num(Date) as Date

2.use set ananlysis in text object         =sum({<Date={$(=max(Date))}>}value)

Regards,

Anant Dubey

Anonymous
Not applicable
Author

Thank you everyone! I've now got a few expressions from which I can pick and choose!