Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
akpofureenughwu
Creator III
Creator III

Pick only value for latest date

Good day one

I have a set of data I need to pick only the latest data

Location01/01/201702/01/201703/01/2017
Area 1150100120
Area 21004060
Area 370100150

I used the crosstable function to resolve my data

Something like this

At the backend

Fox:

CrossTable (Date, Value, 1)

LOAD [Location],

    [42736],

    [42737],

    [42738]

from DAILY Sales.xlsx]

(ooxml, embedded labels, table is Sample);

FinalTable:

Load [Location],

  Date(Num#(Date)) as Date,
Month(Num#(Date)) as Month,
'Q' & Ceil(Month(Num#(Date))/3) as Quarter,
MonthName(Num#(Date)) as MonthYear,
Year(Num#(Date)) as Year,
Day(Num#(Date)) as Day,
Value

Resident Fox;

Drop Table Fox;

All I need is how I can only display value based on latest date

21 Replies
akpofureenughwu
Creator III
Creator III
Author

FirstSortedValue(Aggr(Sum(Sales), Date, Location), -Aggr(Date, Date, Location))


stalwar1‌  Thank you sir, the above script worked well .


Pleae one more question... How can I fetch out the highest sales value per day .... from the above table


The highest  sales value per day = 250 (01.01.2017)


How can I generate this figure from the front end?



Thanks

sunny_talwar

Highest sales value per day? Across all days you want the highest value? May be this

Max(Aggr(Sum(Sales), Date))