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: 
Not applicable

How I show the month one year before

Hello togehter,

I have the formula sum({$<Nature={Actual}>}Amount)

How get a Formula, that I get the Amount of the month one year before.

Thank you.

Jörn

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Hi,

For current and previous year

Current Year Sales

=Sum({<Year = {'$(=Max(Year))'},Nature={Actual}>} Amount)

Previous Year Sales

=Sum({<Year = {'$(=Max(Year)-1)'},Nature={Actual}>} Amount)

Have a look at below post too.

http://community.qlik.com/message/479161#479161

Regards

ASHFAQ

View solution in original post

2 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

For current and previous year

Current Year Sales

=Sum({<Year = {'$(=Max(Year))'},Nature={Actual}>} Amount)

Previous Year Sales

=Sum({<Year = {'$(=Max(Year)-1)'},Nature={Actual}>} Amount)

Have a look at below post too.

http://community.qlik.com/message/479161#479161

Regards

ASHFAQ

Not applicable
Author

If you have order date, then calculate

1. month

2. year

Sum({<year={$(=max(year)-1)},month={"=$(=max({<year={$(=max(year))}>} month))"},

ORDER_DATE={"<=$(=max(ORDER_DATE))", Nature={Actual}}>}(Amount))

So, It will calculate sales for current month in previous year as we have used max(year)-1 and it will calculate it upto the order date selected.

Respond if doubt exists.

Cheers Saurabh Kabra