Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Comparison

Hi,

i would like to calculate for example the sales for a specific day using set analysis.

For the current year i use this expresion

Sum({$<Year = {$(=max(YEAR))}, Month = {"<=$(=max({<Year={$(=max(Year))}>} Month))"}>} sales_value)

For the previous year i use

sum({$<Day = {$(=Day(setdateyear(date_sales_field, 2009)-367))}>} sales_value) but doens't work.

When someone select a certain day i want to calculate the sales for the day in the present year and in the previous year. But there is an issue there: for example the sales of 18 January 2010 most be compared with the sales of 19 January 2009 why? because is the same weekday.

Thanks in advance for any answers.

ANDRE GOMES

DATA ANALYST - AGRILOJA - PORTUGAL

0 Replies