Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how do we find max date

i need to show only max date in a month and the sales on that day.

how to find max date ? like the sales been till 29th of march so how do we tell qlikview to show only max date i.e., 29/03/2014.

8 Replies
Not applicable
Author

sum({<SaleDate={max(SaleDate)}>}Sales)

PrashantSangle

Hi,

I think you are looking for max()

try this,

=max(dateFieldName)

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
its_anandrjs

Hi,

In load if DateField contains max date regularly then use peek function like

Let vMaxDate = Peek('Datefield',-1,'Tablename');


or use

Max(Datefield)


Hope this helps

Thanks & Regards

Not applicable
Author

Hi ,

Create a variable for max date

Let vMaxDate=Max(SaleDate);

And find sales of max date using set analysis

=sum({<SaleDate={'vMaxDate'}>}Sales)

Not applicable
Author

Hi,

try to use "MaxDate" operator

thank you

Not applicable
Author

This might give you required output -

=sum({<CalendarDate={"$(=max(CalendarDate))"}>}Sales)

sunilkumarqv
Specialist II
Specialist II

  create on Calendarday in your script

Load

day(date) as Calendarday

from datasoruce ;

=sum({<Calendarday= {"$(=max({<Date={$(=max(Date))}>} Calandarday))"}>}Sales)

Not applicable
Author

If you are linking to a calendar that projects into the futute then you will have to ensure that it ties up with your sales data.

Add a variable (Ctrl + Alt + V)

Variable vCurrentDate = Date(Max({<SalesReference-=0 > } DateLK), 'DD/MM/YYYY')

Using {<SalesReference-=0 > } will ensure that it pulls back the date from the last sales entry.

The expression would be

=SUM({< DateLK={"$(=vCurrentDate)"} >} CLG_Count)