Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with p() and inequality

I have the following script as an expression but I need it to be greater than or equal to the CalendarDateKey. The normal set analysis  for >= is not working with a p() function. Any help would be great.

Count({$<QvsI = {"I"}, CalendarDateKey1=p(CalendarDateKey)>}QvsI)

5 Replies
Not applicable
Author

this should work

Count({$<QvsI = {'I'}, CalendarDateKey1={">=CalendarDateKey"}>}QvsI)

Not applicable
Author

When I use the given script the output is all zeros.

I have attached a test .qvd. I am having the same issue with the count for quotes too so I just attached that since I already had a test file made using that formula. As you can see, when I put the p() function in with the = sign, it gives me fairly accurate output for the quotes but I need to add the inequality >= to the function. When I use the format above (in column Quotes Test) it gives output of all zeros.

It might be my formatting on the dates but I'm still not sure how to fix this.

Thanks

Not applicable
Author

Does anyone have a suggestion on how to correct this date comparison issue?

Thanks

goldnejea8
Partner - Creator
Partner - Creator

Count({$<QvsI = {'I'}, CalendarDateKey1>={'CalendarDateKey'}>}QvsI)

Not applicable
Author

This script gets a syntax error.

I had tried the script given by Juan, which is what I think you were getting at, but this isn't working. As you can see in my test .qvw above this isn't working in the field Quote Test because it makes all values zero.

Thanks