Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Dutch_dude
Contributor
Contributor

Expression with date filter

Hi,

I am trying to create a measure that computes the max of a field for the rows where date equals the maximum date. So the  maximum value of a field for the latest period in my data. I guess it should be something like  =max({<date={max(date)}>} field). I have tried many things, but can't get the measure to work properly. Can anyone help me?

Many thanks in advance!!

Labels (2)
1 Solution

Accepted Solutions
sidhiq91
Specialist II
Specialist II

@Dutch_dude  You can use the below expression as your expression to get the desired output.

Max({<OrderDate={"$(=Max(OrderDate))"}>}LineSalesAmount)

If this resolves your issue, please like and accept it as a solution.

View solution in original post

2 Replies
Uzumaki_N
Contributor III
Contributor III

First Create a variable in like this: 

arpit1_0-1665234214488.png

then use the following expression:

Max({<[Order Date] = {"$(=Date($(vMaxDate)))"}>}Sales)

sidhiq91
Specialist II
Specialist II

@Dutch_dude  You can use the below expression as your expression to get the desired output.

Max({<OrderDate={"$(=Max(OrderDate))"}>}LineSalesAmount)

If this resolves your issue, please like and accept it as a solution.