Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max Date

Goodafternoon to all,

I am trying work out what the totaal sales is on the highest datum, or otherwise max(date). Sum({$<Date={'31-5-2014'}>}sales) gives a return. I should probably add that i cannot change the script, its locked down(long story). I can only do something with the expression, so can someone please help me out by explaining how i can change the aforementioned expression to work out the max(date). Thanks in advance.

Mo

1 Solution

Accepted Solutions
isaaclin
Contributor III
Contributor III

Try this please

sum({$<Date={"$(=Max(Date))"}>} Sales)

also

you can unlock your code by click unlock icon on the right top corner

View solution in original post

6 Replies
isaaclin
Contributor III
Contributor III

Try this please

sum({$<Date={"$(=Max(Date))"}>} Sales)

also

you can unlock your code by click unlock icon on the right top corner

sunny_talwar

Try this:

Sum({$<Date={"$(=Date(Max(Date), 'D-M-YYYY'))"}>}sales)

Not applicable
Author

Thats great, it works.and if i want to do max(date) minus 1.

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

The guys have suggested you right, just check if it works properly.

To unlock the field look for this icon:

Screenshot_2.png

isaaclin
Contributor III
Contributor III

I am using Qlik Sense , the unlock button is on the top right

sunny_talwar

May be this:

Sum({$<Date={"$(=Date(Max(Date) - 1, 'D-M-YYYY'))"}>}sales)