Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create field by peeking the last value of Every month .

I have data like this:

Value       date

120           1/1/2013

12              31/1/2013

122           31/1/2013

123             1/2/2013

132            15/2/2013

234            30/2/2013

13             30/2/2013

144           30/2/2013

126             1/3/2013

13                31/3/2013

313               31/3/2013..

Now i need to create a field in back end which shows me values ie.. 122, 144,313. which are the last value of the month.Please help me ...

4 Replies
Not applicable
Author

hi

try this

LOAD

LastValue(Value) as lastvalue,

month

Group by month;

tab1:

LOAD  *, date(Date#(date,'DD/MM/YYYY'),'DD-MM-YYYY') as date_new ,

month(date(Date#(date,'DD/MM/YYYY'),'DD-MM-YYYY')) as month

INLINE [

    Value, date

    120, 1/1/2013

    12, 31/1/2013

    122, 31/1/2013

    123, 1/2/2013

    132, 15/2/2013

    234, 28/2/2013

    13, 28/2/2013

    144, 28/2/2013

    126, 1/3/2013

    13, 31/3/2013

    313, 31/3/2013

]  ;

Not applicable
Author

hi

the month of feb either 28 days or 29 days.

preminqlik
Specialist II
Specialist II

Do Group by Year too for Different years

ashwanin
Specialist
Specialist

Use function

floor(MonthEnd(date)) as Monthend_Date  in the script

you will get the month end dates and data in the background.