Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
annafuksa1
Creator III
Creator III

Try

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

and do not use DISTINCT in firstsortedvalue function

sunny_talwar

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)

Not applicable
Author

Thanks, but I still get the same error

annafuksa1
Creator III
Creator III

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.