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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
brunolelli87
Creator II
Creator II

Calculate the average of some items

Dears,

Could you please help me with the following issue?

With the following expression I'm able to calculate the average of VDAF:

 

=AVG(VDAF)

 

 

With the following expression, using set analysis, I'm able to calculate the average of VDAF, exclusively for STCK=GOLL4:

 

=avg({1<STCK={'GOLL4'}>} VDAF)

 

 

How can I calculate the average of VDAF for the following STCKs
GOLL4, AZUL4, ITUB4, CVCB3... I'm doing something like this, but I'm not sure if it's correct or not..

=avg({<STCK={'GOLL4', 'ITUB4', 'BBAS3', 'PETR4', 'CVCB3', 'AZUL4', 'GGBR4', 'BRFS3', 'MOVI3',
'BBDC4', 'AMAR3', 'USIM5', 'HGTX3', 'CCRO3', 'CEAB3', 'VVAR3', 'LAME4', 'BRDT3', 'EQTL3', 'COGN3'}>}VDAF)


And what will be the interference of $ instead of 1 at set analysis?

Thanks

1 Reply
vamsee
Specialist
Specialist

The expression looks okay to me, are you facing any error with that?

$- Considers the current selections into account while calculating the chart

1- Does not consider any selections while calculating the chart

Refer

Identifiers in Qlik

set-analysis-qlikview