Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, could you help me to solve this issue?
I would to recover the last MonthYear having sum (value) not null or <> 0.... in this case is 2015-05:
| MonthYear | Value |
| 01/2014 | 5594,32 |
| 02/2014 | 5424,77 |
| 03/2014 | 5971,83 |
| 04/2014 | 5249,14 |
| 05/2014 | 4829,82 |
| 06/2014 | 4004,63 |
| 07/2014 | 3206,25 |
| 08/2014 | 2666,68 |
| 09/2014 | 2177,81 |
| 10/2014 | 1553,43 |
| 11/2014 | 970,3 |
| 12/2014 | 621,4 |
| 01/2015 | 199,11 |
| 02/2015 | 24,42 |
| 03/2015 | 2,58 |
| 05/2015 | 1 |
Thanks!
Are you looking to save that information in a variable?
In a variable, v
s:
load *, makedate(right(MonthYear,4), left(MonthYear,2)) as D
inline [
MonthYear Value
01/2014 5594,32
02/2014 5424,77
03/2014 5971,83
04/2014 5249,14
05/2014 4829,82
06/2014 4004,63
07/2014 3206,25
08/2014 2666,68
09/2014 2177,81
10/2014 1553,43
11/2014 970,3
12/2014 621,4
01/2015 199,11
02/2015 24,42
03/2015 2,58
05/2015 1
] (delimiter is spaces);
First 1 load
Value as LastValue
Resident s
where Value > 0 // added
order by D desc;
let v = Peek('LastValue');