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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
fenjas72
Contributor II
Contributor II

Expression optimization

Hi,

I'm using the following expression to select 7 days for the given field. I am relatively new to expressions and was wondering if there's a neater way to do this:

='$(=date(Max({1} Total [Placed Bet Date])-6));' &
'$(=date(Max({1} Total [Placed Bet Date])-5));' &
'$(=date(Max({1} Total [Placed Bet Date])-4));' &
'$(=date(Max({1} Total [Placed Bet Date])-3));' &
'$(=date(Max({1} Total [Placed Bet Date])-2));' &
'$(=date(Max({1} Total [Placed Bet Date])-1));' &
'$(=date(Max({1} Total [Placed Bet Date])))'

fenjas72_0-1726664451841.png

Thanks!

 

Labels (1)
2 Replies
hic
Former Employee
Former Employee

Try
>=$(=date(Max({1} Total [Placed Bet Date])-6))

fenjas72
Contributor II
Contributor II
Author

Hi,

In hindsight, your solution makes perfect sense however, even though it evaluates correctly, no selections are made.

fenjas72_4-1727186911313.png

 

It seems that the only way to set selections is to pass values as a comma-delimited string. I'm using a sheet action as follows:

fenjas72_0-1727186812288.png

Thanks!