Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Query about financial year!

Hi All,

This is the expression i used to calculate the increase in current year sales when compared to the previous year.

Sum({$<Year={$(=Max(Year))}>} SalValue) / Sum({$<Year={$(=Max(Year)-1)}>} SalValue)


But now i want to calculate the increase in current financial year sales when compared to the previous year. Let me know what changes has to done in the above expression to get the needed result.

By the way i use the following query in the list box to get the financial year. Let me know whether it can be added to the above one or not.

=yearname(Date,0,4)


Thanks and Regards,

Rikab

Labels (1)
4 Replies
Not applicable
Author

Try this ;


Sum({$<Date={">=$(=date(max(yearstart (Date,0,4))))<=$(=date(max(yearend (Date,0,4))))"}>} SalValue)
/
Sum({$<Date={">=$(=date(addmonths(max(yearstart (Date,0,4)),-12))))<=$(=date(addmonths(max(yearend (Date,0,4)),-12)))"}>} SalValue)


Best Regards

Not applicable
Author

Hi Onder!

Thanks for effort but it doesn't work.

Thanks and Regards,

Rikab

Not applicable
Author

Could you please check the sample ? Its working.

Best Regards,

Not applicable
Author

Hi Onder!

I have checked it in yours it is working in yours but it is not working in mine. I guess the problem may be because of the date value. All my date values start with the starting day of the month and there is no month end date. Is that creating the problem? Please check and let me know. In your also you keep only the starting date of the month then check your set analysis.

I am also working around. Will check and let you if i get any solution.

Thanks and Regards,

Rikab