Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

Last 1 yr sales

Helo All,

For month April, against Warranty value, i want sales for last 1 yr i.e. for apr2015 warranty value, i want apr2014 to apr2015 sales value. I tried it but it is coming 0. Can anyone help me in this?

9 Replies
sunny_talwar

Try this:

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

tamilarasu
Champion
Champion

Hi,

I just added a equal sign in front of the data calculation. Check the attachment.

Capture.PNG

Capture.PNG

sunny_talwar

I guess mine is just for Month of Apr and you are looking for the sales during the complete last year. I would suggest to go with Tamil‌'s solution.

nikhilgarg
Specialist II
Specialist II
Author

Hey,

Thanks but this also does not solve my purpose. If you see for Nov 2014, it should show sales from Nov2013 to Nov 2014 . But it is not showing as expected.

sunny_talwar

Can you try this:

If(Sum(Warranty) > 0, Sum(TOTAL{<Date = {">=$(vMinDate1)<=$(vMaxDate)"}, Year, Month>}Sales))

nikhilgarg
Specialist II
Specialist II
Author

Hey Sunny,

Thanks for your reply. But i would like to clear my requirement. Please find my attached updated qlikview file which is exact req that i want.

For every warranty value against month, i want avg sales for last 12 months if type is 2whl else if type is 3 whl then avg sales of last 18 month. Can you help me in this? It is kind of urgent

sunny_talwar

What is the output you are looking for? May be share the output in an excel file?

nikhilgarg
Specialist II
Specialist II
Author

HEy Sunny,

The kind of output i want is as attached. Please revert if any query.

thanks

nikhilgarg
Specialist II
Specialist II
Author

Hey Sunny,

Can you help em in this?