Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

3 Replies
Not applicable
Author

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
Author

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
Author

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