Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
LearnFreak
Contributor III
Contributor III

Set Analysis date, 2 conditions

Hi,

I have a set analysis and need to restrict the range of the maxmim date to -1 - 

=max({<BREAK={'5Days'}>}date(DATE))

I tried like this but I have an error - 

=max({<BREAK={'5Days'}, DATE = {Today()-1}>}date(DATE)) and

=max({<BREAK={'5Days'}>+< DATE = {Today()-1}>}date(DATE))

Do you have any other idea?

Thanks.

 

1 Solution

Accepted Solutions
LearnFreak
Contributor III
Contributor III
Author

I solved it like this - 

=max({<BREAK={'5Days'}>}date((DATE)-1))

and it worked perfectly. In fact it gave the maximum date - 1.

View solution in original post

4 Replies
BrunPierre
Partner - Master
Partner - Master

=max({<BREAK={'5Days'}, DATE = {'$(=Date(today()-1))'}>}date(DATE))

LearnFreak
Contributor III
Contributor III
Author

Hi, I tried it like that but now the whole chart dissapeared. 

I tried like this - 

=max({<BREAK={'5Days'}>}date((DATE)-1))

and it showed for example if the Last date was 9th of September, it showed 8th of September...

but I am not sure if it is the correct result.

 

BrunPierre
Partner - Master
Partner - Master

In fact, the above expression will return the '8th of September' only for the value of BREAK which is “5Days".

Are you expecting a different outcome? Perhaps you could share some data and want you to hope to achieve.

LearnFreak
Contributor III
Contributor III
Author

I solved it like this - 

=max({<BREAK={'5Days'}>}date((DATE)-1))

and it worked perfectly. In fact it gave the maximum date - 1.