Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ramak
Contributor
Contributor

Compare the CY Sales and PY Sales by Country in one table. Year and month selection should not be affects the data

Hi

 

Can you please help with the syntax for 

Compare the CY Sales and PY Sales by Country in one table. Year and month selection should not be affects the data ?

I used the below syntax but it is not working

sum({<Year={"$(=Max(Year))"},Year=,Month=>}Sales)  for current year sales

 

can you please help 🙂

 

1 Reply
sasikanth
Master
Master

Try below 

CY:

sum({<Year={"$(=Max({1}Year))"}, Month=>}Sales) 

PY:

sum({<Year={"$(=Max({1}Year)-1)"}, Month=>}Sales)