Qlik Community

QlikView Administration

Discussion Board for collaboration on QlikView Management.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
GartoJsar
Partner - Contributor III
Partner - Contributor III

Get sales from the previous year of the last date

Good afternoon
I need your support please
How can I get sales from the previous year but the last maximum date.
for example:

DATE, SALES
ene/31/2018, 20
feb/28/2050
dic/31/2018, 150
ene/31/2019, 24
feb/28/2019
mar/31/2019
abr/30/2019
may/31/2019
jun/30/2019
jul/31/2019
ago/31/2019
Then they ask me to create a report comparing the sales that were made the previous year with the maximum date that would be: 12/31/2018, 150 and in another column the maximum current date that would be: 08/31/2019 . But what I can't get is the maximum date of the previous year.
Could you help me with an example, how to apply the analysis set to consider only the last date of the previous year?

Thank you so much
regards

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try a set calculation like this.

 

=Sum({< Date={"=$(=Max({<Year={'$(=max(Year)-1)'}>}DATE))"}>}Sales)

View solution in original post

2 Replies
Vegar
MVP
MVP

Try a set calculation like this.

 

=Sum({< Date={"=$(=Max({<Year={'$(=max(Year)-1)'}>}DATE))"}>}Sales)

GartoJsar
Partner - Contributor III
Partner - Contributor III
Author

Thank you very much Vergar
Your help served me and I solved what I wanted

thank you