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

latest date

Good day!

How i can get latest date with added condition?

For this table i must get latest date, where the quantity > 2 (09.11.2013)

dateQuantity
12.11.20132
09.11.20133
08.11.20134
07.10.20136
06.10.20138

Thank you!

13 Replies
vardhancse
Specialist III
Specialist III

use max(date) it will give u the latest date

Anonymous
Not applicable
Author

Use this

=Max(Date)

vardhancse
Specialist III
Specialist III

create one variable:

let vDate = vMax(date)

Expression for Eg:

count({$<Date=vMax(date)>}Account)

Anonymous
Not applicable
Author

if i will use only =Max(Date), i'll get 12.11.2013, but it's wrong for my task.

i want to get max date, where quantity > 2

correct date must be 09.11.2013

Anonymous
Not applicable
Author

ok, for your expression,

what it will give me with my data ?

dateQuantity
12.11.20132
09.11.20133
08.11.20134
07.10.20136
06.10.20138
vardhancse
Specialist III
Specialist III

so you are trying to get the count where account>2 or

account>2 only for the latest date

lironbaram
Partner - Master III
Partner - Master III

hi

so you can use max({<quantity={">2"}>}Date)

and if you need to aggregate the quantity than use

max(aggr(if(sum(quantity)>2,Date),Date))

vardhancse
Specialist III
Specialist III

here max(date)=12.11.2013 so the count will be 2

mahesh_agrawal
Creator
Creator

Hi,

PFA