Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max MonthYear for not null value

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:

  

MonthYearValue
01/20145594,32
02/20145424,77
03/20145971,83
04/20145249,14
05/20144829,82
06/20144004,63
07/20143206,25
08/20142666,68
09/20142177,81
10/20141553,43
11/2014970,3
12/2014621,4
01/2015199,11
02/201524,42
03/20152,58
05/2015

1

Thanks!

2 Replies
sunny_talwar

Are you looking to save that information in a variable?

maxgro
MVP
MVP

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');