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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
jheasley
Creator III
Creator III

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