Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

slondono
Contributor 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

Tags (1)
4 Replies

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

Would you be able to share some sample data?

jpenuliar
Valued Contributor III

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

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

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

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
Contributor II

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

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

Community Browser