Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
jheasley
Luminary Alumni
Luminary Alumni

2 variables in set analysis

Hello All - i have bumped into a weird problem.  I need to to an Aggr(only(_LANE_ID_WF),_LANE_ID_WF), but my set analysis has 2 variables:

1: $(wf_ADD) - contains an expression with set analysis
2: $(t_toplanes) - contains a number between 5 and 25
need: only show values where the rank of wf_add is less than t_toplanes

the following is NOT working:
aggr(Only({<
           _LANE_ID_WF = {"=Rank($(wf_ADD)) <='$(t_toplanes)'"}
                       >}
_LANE_ID_WF), _LANE_ID_WF)

help!

1 Reply
treysmithdev
Partner Ambassador
Partner Ambassador

Usually with AGGR you need to add set analysis to both the inside and outside expressions.

See if this works:

Only({<_LANE_ID_WF = {"=Rank($(wf_ADD)) <='$(t_toplanes)'"}>}
    aggr(Only({<_LANE_ID_WF = {"=Rank($(wf_ADD)) <='$(t_toplanes)'"}>}_LANE_ID_WF), _LANE_ID_WF))

 

Blog: WhereClause   Twitter: @treysmithdev