Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
slondono
Partner - Creator II
Partner - Creator II

How to compare the sales of the Selected year vs the last year

Hi guys

I need to know how to compare in a table the total sales of the selected year vs the last year. Im so new in qlik but i think that i need to use GetcurrentSelection or a variable i dont know.

Can anyone Helpme please

Thanks

4 Replies
sunny_talwar

Would you be able to share some sample data?

jpenuliar
Partner - Specialist III
Partner - Specialist III

have a look at this link

QlikView How To (or Tips & Tricks) Application by Lee Matthews

http://community.qlik.com/docs/DOC-5486

Not applicable

there are a couple of options

If you want to select the years you are comparing, I would recommend alternate states

If it is always going to be current year and prior year inforamtion, I would suggest set analysis in your expression(s).

Your expressions would be basically the same but the set analysis would be looking at different time periods such as current year, current year-1 as an example

slondono
Partner - Creator II
Partner - Creator II
Author

The solution

vLastYear = GetFieldSelections(Calendar.Year)-1

Sum({<Calendar.Year = {$(vLastYear)} >} Sales)

Something like that. But is already working, thanks to all. Hope this help someone else