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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable in Set Analysis

Hi all

I am struggling to get a variable in set analysis to return the correct amount

count({<[*Lineout Type]={'$(vLineout_FCV_Win)'}>} [*Lineout Type])

where

vLineout_FCV_Win = FirstSortedValue(DISTINCT [*Lineout Type],-aggr(count({<[*Result]={'Win'}>}[*Lineout Type])+rank([*Lineout Type],[*Lineout Type])/10,[*Lineout Type]))

Thanks

13 Replies
Not applicable
Author

Hi Marcus

I am still struggling with adding the variable to a set analysis expression

count({$<STATS_LineoutType_Number_Combo={'vSTATS_Top_LineoutCombo_Win'}>} STATS_LineoutType_Number_Combo)

where vSTATS_Top_LineoutCombo_Win = firstsortedvalue( DISTINCT STATS_LineoutType_Number_Combo, -Aggr(count({<STATS_LineoutType_Number_Combo-={' / '},[STATS Group Movement Result]={'Effective'}>}STATS_LineoutType_Number_Combo),STATS_LineoutType_Number_Combo))

I get the error;

Error in set modifier ad hoc element list:

',' or ')' expected

marcus_sommer

I think you need to use: '$(vSTATS_Top_LineoutCombo_Win)' as far as your variable-expression will be caluclated within the variable.

- Marcus

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Please provide below info :

1.if u take that variable in text box , what is ur output in it ?

2.What is Lineout Type consist.

-Nagarjun

Not applicable
Author

The output is ''5 Man / Middle''

Lineout Type consists of text strings (5 Man, 4 Man, Full)