Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
Not applicable

Set Analysis Error

Hi all

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

Regards

4 Replies
Highlighted
annafuksa1
Contributor III

Re: Set Analysis Error

Try

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

and do not use DISTINCT in firstsortedvalue function

Highlighted

Re: Set Analysis Error

Have you tried using this expression in a text box object?

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))

Does it give you a single value? This is the same value which will be used in your set analysis and will stay the same across all dimensions? If that is all fine, then try this:

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

Highlighted
Not applicable

Re: Set Analysis Error

Thanks, but I still get the same error

Highlighted
annafuksa1
Contributor III

Re: Set Analysis Error

the second problem is 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))



you try to do operation on one to many value



I have not idea what should be the result but Aggr function should be to full expression not the part, or erase Aggr function.