Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

Current vs previous sales

Hello.

I'm looking for days a formula with set analysis, when i select the day of the current year to show me in a chart the current selected day sales and the previous day sales (-364 days)
For example if i select 23/10/2013 to shows me the sales for 23/10/2013 and the sales for 24/10/2012.

I can't find anything. Can someone help me with this problem?

I have an attach file below.

Thank you in advance.

1 Solution

Accepted Solutions
mdmukramali
Specialist III
Specialist III

Dear,

Kindly find the attachment.

Thanks,

Mukram.

View solution in original post

4 Replies
mdmukramali
Specialist III
Specialist III

Dear,

Kindly find the attachment.

Thanks,

Mukram.

rustyfishbones
Master II
Master II

Try


Sum({< DATE = {'$(=DATE(Today()))', '$(=DATE(AddYears(Today(), -1)))'} >} SALES)

geogou1973
Creator
Creator
Author

Thank you very much.

It was so simple with the variable.

geogou1973
Creator
Creator
Author

Dear Mohammed i try to apply this formula to compare the current and the previous sales by giving the year and the month but i don't have a result for the previous.

I create a variable for the previous year    vPreviousYear=max(YEAR)-1

and in set analysis i write the following:

=Sum({<YEAR={'$(vPreviousYear)'},MONTH=>}sales)

What i do wrong.

Can you help me ?