Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
HarshChachara
Contributor
Contributor

How to get a use the maximum date of each given year in a set expression

Hi I am looking for the following output

Year  | MaxDate        |  Sales on MaxDate

2020 | 31/03/2020   |   10

2019 | 31/12/2019   |    20

2018 | 31/12/2018   |   30

 

 

I can't get to a formulation/set analysis that allows me to use the maxdate in the set analysis.

Please advice.

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan

Hi Harsha,

Try like below

Sum({<Date={$(=Chr(39)&Concat(Aggr(Date(Max(Date)),Year),chr(39)&','&chr(39))&chr(39))}>}Sales)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

1 Reply
MayilVahanan

Hi Harsha,

Try like below

Sum({<Date={$(=Chr(39)&Concat(Aggr(Date(Max(Date)),Year),chr(39)&','&chr(39))&chr(39))}>}Sales)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.