Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis Expression isn't Working

Hi - I've been trying to get the set analysis in this expression to work but I haven't been successful.  I think it might be a syntax error but I can't find where it is.  Can anyone help?  I know that is calculating the correct number for the portion of the expression that calculates the number of days ((MonthEnd(max(DeliveryDate))-(today()-2))).  I tested that separately but when I add it to the set analysis it doesn't work.

sum({$<OrderToDeliveryDays={'>=($=(MonthEnd(max(DeliveryDate))-(today()-2)))'}>}Sales)

Essentially, this expression is only summing the sales when the # of OrderToDeliveryDays is greater than or equal to a specified number.

Thanks.

1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum({$<OrderToDeliveryDays = {">=$(=Floor(MonthEnd(Max(DeliveryDate)))-(Today()-2))"}>} Sales)

View solution in original post

6 Replies
sunny_talwar

Try this

Sum({$<OrderToDeliveryDays = {">=$(=Floor(MonthEnd(Max(DeliveryDate)))-(Today()-2))"}>} Sales)

rafatashiro
Contributor III
Contributor III

Hello!

Did U try to use double quotes?


sum({$<OrderToDeliveryDays={  " >=($=(MonthEnd(max(DeliveryDate))-(today()-2))) " }>}Sales)

Anonymous
Not applicable
Author

Thanks!  The use of the floor function worked.

Anonymous
Not applicable
Author

The floor function solved my issue.  The use of single vs. double quotes didn't make a difference.

sunny_talwar

Although it might not have made a difference, I suggest to use double quotes for search string because the later versions of QlikView and Qlik Sense now don't treat both the same way. Read more on this here

Quotes in Set Analysis

Anonymous
Not applicable
Author

Thank you Sunny!  That was helpful.