Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
t_chetirbok
Creator III
Creator III

Comparison sum sales in Year with Previous Year

Hi!

I need to create straight table where Dimensions are Customer, Product, Storage, Year

and Expressions are sum(Sales) in Year and sum(Sales) in Previous Year.

Something like this:

where number in column F is Sales in 2015 and number in column G is Sales in 2015 -1

Any idea how can I do it?

Many thanks!

13 Replies
sunny_talwar

If you are ever going to select one year, then may be this:

=Before(Sum({<Year = {$(=If(GetSelectedCount(Year) = 1, GetFieldSelections(Year)-1, Chr(39) & '*' & Chr(39)))}>}Sales))

Capture.PNG

t_chetirbok
Creator III
Creator III
Author

thanks, it very expensive to change script, cause we'll need to add set analysis with Period=Current at all objects in many reports.

t_chetirbok
Creator III
Creator III
Author

It's cool!!

It is exactly what we need.

Thank you, Sunny!

Gysbert_Wassenaar

Only in the reports where you replace the Year dimension with the ReportYear dimension.


talk is cheap, supply exceeds demand