Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
fmazzarelli
Contributor 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
Honored Contributor III

Re: average of total anticipated

Try below expression,

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

Re: average of total anticipated

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

)