Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis using dates

I’m trying to use set analysis to calculate the revenue sum for the same day the previous week using the following:

SUM({$<Date={$(=Max(Date)-7)}>} MonetaryValue)

But for some reason, I keep getting zero values returned and I can’t understand why. There is definitely revenue there and it works fine if I hardcode the date within the {}.

Thanks


1 Solution

Accepted Solutions
Not applicable
Author

Thanks Clever Anjos, my colleague who was having this problem has managed to get round it using the following syntax:

SUM({$<Date={$(='['&Date(Max(Date)-7)&']')}>} MonetaryValue)

View solution in original post

2 Replies
Clever_Anjos
Employee
Employee

SUM({$<Date={$(=Date(Max(Date)-7))}>} MonetaryValue)


Max() will return a number, not a formatted date

Not applicable
Author

Thanks Clever Anjos, my colleague who was having this problem has managed to get round it using the following syntax:

SUM({$<Date={$(='['&Date(Max(Date)-7)&']')}>} MonetaryValue)