Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vikas_nandanwar
Creator II
Creator II

Pick data from last date of the sheet

Hi,,

I have date wise Inventory with below columns -

   

DateParticulars Stock
29-Oct-17Raw200
29-Oct-17Mfg100
29-Oct-17Ref300
30-Oct-17Raw250
30-Oct-17Mfg310
30-Oct-17Ref280
31-Oct-17Raw230
31-Oct-17Mfg400
31-Oct-17Ref200
1-Nov-17Raw370
1-Nov-17Mfg500
1-Nov-17Ref200

I want to pick 1st nov data in piechart
as Raw = 370, Mfg = 500, Ref = 200

Thanks,

Vikas

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Script:

Inventory:
LOAD Date(Date#(Date,'DD-MMM-YY'),'DD-MMM-YY') as Date, Particulars, Stock;
LOAD * INLINE [
Date, Particulars, Stock
29-Oct-17, Raw, 200
29-Oct-17, Mfg, 100
29-Oct-17, Ref, 300
30-Oct-17, Raw, 250
30-Oct-17, Mfg, 310
30-Oct-17, Ref, 280
31-Oct-17, Raw, 230
31-Oct-17, Mfg, 400
31-Oct-17, Ref, 200
1-Nov-17, Raw, 370
1-Nov-17, Mfg, 500
1-Nov-17, Ref, 200
]
;


Pie Chart:


Dimension:  Particulars

Expression: Sum({<Date = {"$(=Max(Date))"}>} Stock)

View solution in original post

8 Replies
Anil_Babu_Samineni

Create Pie chart

Dimension - Particulars

Expression

Sum({<Date = {$(=Max(Date))}>} Stock)

Where Date should be format of Date(Date, 'DD-MMM-YY') as Date

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vikas_nandanwar
Creator II
Creator II
Author

This do not work

Can you suggest more

tamilarasu
Champion
Champion

Hi Vikas,

Like this?

Captureq.PNG

vikas_nandanwar
Creator II
Creator II
Author

yes

tamilarasu
Champion
Champion

Have a look at the attachment.

vikas_nandanwar
Creator II
Creator II
Author

Can you provide me the direct expression

tamilarasu
Champion
Champion

Script:

Inventory:
LOAD Date(Date#(Date,'DD-MMM-YY'),'DD-MMM-YY') as Date, Particulars, Stock;
LOAD * INLINE [
Date, Particulars, Stock
29-Oct-17, Raw, 200
29-Oct-17, Mfg, 100
29-Oct-17, Ref, 300
30-Oct-17, Raw, 250
30-Oct-17, Mfg, 310
30-Oct-17, Ref, 280
31-Oct-17, Raw, 230
31-Oct-17, Mfg, 400
31-Oct-17, Ref, 200
1-Nov-17, Raw, 370
1-Nov-17, Mfg, 500
1-Nov-17, Ref, 200
]
;


Pie Chart:


Dimension:  Particulars

Expression: Sum({<Date = {"$(=Max(Date))"}>} Stock)

vikas_nandanwar
Creator II
Creator II
Author

Thanks

This worked