Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

If condition convert to set analysis

Hi guys,

Just a simple query. How to convert this if condition into set analysis?

=if(EndTime <= weekstart(Today()) and EndTime >= weekend(Today()), EndTime, Null())

This code is working.. I just want to use its set analysis counterpart (if its possible)

Thanks

1 Solution

Accepted Solutions
Highlighted
Creator
Creator

Something like this?

only({<EndTime = {"<=$(=weekstart(Today()))>=$(=date(weekend(Today())))"}>} EndTime)

View solution in original post

3 Replies
Highlighted
Creator
Creator

Something like this?

only({<EndTime = {"<=$(=weekstart(Today()))>=$(=date(weekend(Today())))"}>} EndTime)

View solution in original post

Highlighted
MVP
MVP

null()

In other words, the code you posted will always return null. If your application is working, you did not post the code your application is using. The end time cannot simultaneously be <= the start of the week and >= the end of the week. Since that was probably a typo, go with aby's answer. You'll probably need a date() function around weekstart() too, though.

Highlighted
Not applicable

Ops! I pasted the wrong code. Thanks John!. Big Smile