Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
holymosfet
Contributor III
Contributor III

Compare Sales of Current Year with Sales of Previous Year

Hi all,

it's driving me crazy and I found dozens of posts that all bring up the same solution that won't work for me.

I'm trying to compare the Sales with the Previous Year's Sales. Does anyone know why I don't get the correct numbers?

holymosfet_0-1716990403167.png

Any help is much appreciated.

Labels (1)
4 Replies
Clement15
Partner - Creator III
Partner - Creator III

Hello, if it is for a table you can use this formula :
Above(sum(Sales))

anat
Master
Master

use above(sum(sales)) for previous year sales 

holymosfet
Contributor III
Contributor III
Author

Hi Anat,

thank you for your reply. The above() function only works on row level in the diagram. If I add other dimensions it won't work.. 😞

 

Any idea why 

Sum({$<Year={$(=max(Year)-1)}>} Sales)

does not work?

paulcalvet
Partner - Specialist
Partner - Specialist

Hello,

It doesn't work because in Qlik a variable in set analysis is the same for each line in your table.

In your case the variable is always set to 2022, that's why only the line for 2022 is filled.

In table you must use above.

Regards,