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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
fmazzarelli
Partner - Creator III
Partner - Creator III

average of total anticipated

Hi Community,

how could I make the average of a total (automatically calculated)?

See image attachedImmagine.png

2 Replies
shraddha_g
Partner - Master III
Partner - Master III

Try below expression,

if(dimensionality>1, sum(Sales),avg(Sales))

rubenmarin

Hi Fabio, if yer and month are dimensions you can check the level to set a different expression for the total:

Try set an expression with "=SecondaryDimensionality()" (without the double quotes)

It may show '0' in the total column and '1' in the months columns, in this case you can use this to set the different expressions, so the expression you need may be something like:

If(Secondarydimensionalty()>0,

YourCurrentExpression,

Avg(Aggr(YourCurrentExpression, YearFieldName, MonthfieldName)) // For Total column

)