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: 
Not applicable

Using a < (Less than) in Set analysis)

Hello All,

I'm trying to include a < (Less Than) sign to denote that I want  all possible selections which fall before a selected date. However the formula does not seem to return any values. Has anyone ever done this succesfully? Any ideas what such a structure might fail?

The logic I'm trying to get to is:

If (purchase date <= selected date)

And

If (send date month = selected month)

Then

Sum(Revenue)

I hope this is clear. I could really use the help.

8 Replies
SunilChauhan
Champion II
Champion II

try this

sum({<[purchase date] = {"<$(Only([purchase date]))"}>} valuefield)

hope this helps

Sunil Chauhan
Not applicable
Author

Thanks for your answer but that does not help me. "Only" function returns a value only if a have one and only one selected value. In my case I think Max or MaxString will be a better option.

I tried this but It returns a null.


Sum({$<, Purchase_Date = {"<= $(=Max(SendDate)) "}>} Amount)


Not applicable
Author

I don't think you need that first "," try remoiving it.

Stephen

Not applicable
Author

Yes, you do need the quotes when using expressions like >= <= and similar.

Not applicable
Author

Just to clarify I'm talking about remove the first comma. Igor is right that you need the quotes.

Not applicable
Author

I have tried your suuggestions without getting different results. Thanks for your help so far.

cesaraccardi
Specialist
Specialist

Hi, I think you have different date formats... have you checked that?

Not applicable
Author

Thanks for the suggestion but they are formatted correctly. Both in terms of data format and date format.