Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
simospa
Partner - Specialist
Partner - Specialist

Both Precedes and Follows in Set Analysis

Hi!

I'm trying to use precedes and follows in Set Analysis, and they are what I need: I saw the posts about them where @swuehl and @petter explained how to use "separately".

But I need to use them... both in the same Set Analysis for the same field.

For example: OrderNo between  'V21013238' and 'V21016423' (I set them into two variables, vOrderFrom and vOrderTo).

I tried to use:

Sum({$< [OrderNo ] = {"=[OrderNo ] follows '$(vOrderFrom)' "},
                   [OrderNo ] = {"=[OrderNo ] precedes '$(vOrderTo)' "}
>} [Amount])

but it doesn't work 😞

Any help please?

Thank you!

S.

1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Give a try like:

Sum({$< [OrderNo ] = {"=[OrderNo ] follows '$(vOrderFrom)'   AND  [OrderNo ] precedes '$(vOrderTo)' "}
>} [Amount])

View solution in original post

2 Replies
tresB
Champion III
Champion III

Give a try like:

Sum({$< [OrderNo ] = {"=[OrderNo ] follows '$(vOrderFrom)'   AND  [OrderNo ] precedes '$(vOrderTo)' "}
>} [Amount])

simospa
Partner - Specialist
Partner - Specialist
Author

Thank you, it works!

I was not so far, but your solution is perfect!

S.