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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare value of different date

Hi,

in the attached document I have prepared a little example.

I want to show the difference between the Sales calculated against the selected date and the Sales calculated against the selected date - 1.

Can you explain me how can I do this ?

Thx 🙂

2 Replies
Not applicable
Author

Use set analysis and create 2 variables

vToday =Date
vPreviousDate =date(vToday -1)


first expression =sum(Sales)
second expression =sum({<Date= {'$(vPreviousDate)'}>} Sales)
third expression = column(1)-column(2)

see attached

Not applicable
Author

The variables work well. You can also do it with straight Set Analysis using something like:

Sum({<Date={'$(=Date(Max(Date)-1))'}>}Sales)