Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)
date | Quantity |
12.11.2013 | 2 |
09.11.2013 | 3 |
08.11.2013 | 4 |
07.10.2013 | 6 |
06.10.2013 | 8 |
Thank you!
use max(date) it will give u the latest date
Use this
=Max(Date)
create one variable:
let vDate = vMax(date)
Expression for Eg:
count({$<Date=vMax(date)>}Account)
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
ok, for your expression,
what it will give me with my data ?
date | Quantity |
12.11.2013 | 2 |
09.11.2013 | 3 |
08.11.2013 | 4 |
07.10.2013 | 6 |
06.10.2013 | 8 |
so you are trying to get the count where account>2 or
account>2 only for the latest date
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))
here max(date)=12.11.2013 so the count will be 2
Hi,
PFA