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
Did you mean:
Partner - Contributor III

## Get sales from the previous year of the last date

Good afternoon
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)
• ### Get sales from the previous year of the last date

1 Solution

Accepted Solutions
MVP

Try a set calculation like this.

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

2 Replies
MVP

Try a set calculation like this.

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

Partner - Contributor III
Author

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

thank you