Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

qty for max date <= end date variable

help with the below set analysis. i'm looking for the qty for the max date, less than or equal to the user defined date. i'm using a end date variable as the user defined date.

the qvw doesn't seem to like the second {, its red underlined.

sum ({$<max(inv_cal_dt)={$(=$(EndDate))

Thanks,

Sara

1 Solution

Accepted Solutions
Not applicable
Author

I was given this, and it works!!

FirstSortedValue({$<inv_cal_dt={"<=$(EndDate)"}>} oh_qty, -inv_cal_dt)

View solution in original post

4 Replies
Not applicable
Author

SUM({<inv_cal_dt={$(=Max(EndDate))}>}VALOR)

Not applicable
Author

tried this, did not work. it still doesnt like the second {

sum

({$<max(inv_cal_dt)={$(=$(EndDate))}>}oh_qty

Not applicable
Author

I do not think you can use max() in the first part of set analysis. I believe it needs to be a field.

You can set this as a new field in the script using a resident load with a group by function.

Not applicable
Author

I was given this, and it works!!

FirstSortedValue({$<inv_cal_dt={"<=$(EndDate)"}>} oh_qty, -inv_cal_dt)