Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

KPI - Actual year and previous year

Hi everyone, I just want to know the correct formula (in KPI) to show the figure of the previous year when selecting a year or month. I have used the next formula but it's not working at all:

Sum({$<AÑO={$(=max([AÑO]-1))}>}[Unidad Ventas])

The one in actual year is working correctly, so it is only this one I need to correct.

Thank you!!!

Joaquin.

Tags (1)
3 Replies
Not applicable

Re: KPI - Actual year and previous year

You can use for Month like this and similarly for year too.

Previous Month : Sum({<DateID{$(=max(DateID)-1)}>}Qv_Amount)

Current Month :

Sum({<DateID={$(=max(DateID))}>}Qv_Amount)

Not applicable

Re: KPI - Actual year and previous year

Hi Lohit, would you mind to show me the YEAR formula too, so i can compare results with mine.

Thank you very much!

Not applicable

Re: KPI - Actual year and previous year

You can try using Calendar measures. Check this video out: Measures - Creating calendar measures ‒ Qlik Sense

Community Browser