Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to add an average on a qlikview pivot table ?

Hi everyone,

Hi, I'd like to add an aggregated column with the average at the end of the attached report.

I don't find any way to do that, especially the aggregation option is disable for all the expressions.

Any idea ?

Message was edited by: Bertrand Q.

14 Replies
YoussefBelloum
Champion
Champion

Hi,

the table on your screen shot is a pivoted table on qlikview ?

what is the average you want to calculate ?

Anonymous
Not applicable
Author

Yes, I'd like the average of all the months.

jyothish8807
Master II
Master II

Hi Bertrand,

Try like this:

Convert your expression into dual:

Dimension: Product

Exp1: Dual (Avg(A),Sum(A))

Exp2: Dual(Avg(B),Sum(B))

No go to presentaion tab in your pivot chart, select the dimension on which yo want to aggregate and label it Average.

Hope it help.

Br,

KC

Best Regards,
KC
jyothish8807
Master II
Master II

Capture.JPG

Best Regards,
KC
Anonymous
Not applicable
Author

Hi Jyothish,

I try to do that bu the "Show Partial Sums" is still disabled.

Also all my fields are numbers, so I don't need any Dual, am I right ?

Anonymous
Not applicable
Author

Hi ,


Use the below code in expression.


=If(SecondaryDimensionality() = 0, Avg(Aggr(Sum(sales), year_month)), Sum(Sales))


If not solved your problem, post a sample application.


Thanks & Regards,

Venkata Sreekanth

Anonymous
Not applicable
Author

I still can't do it.

I've just added my sample report.

Anonymous
Not applicable
Author

Hi,


In the attached application, last sheet contains the pivot table. Inside the pivot table last column is showing you the AVG column.


I simplified the condition because to get the AVG column. In your case try to modifiy the same condition on you requirements. Use the same kind of expression in all places , noow i have implemented only for "Souscriptions - Perf. à J+1"



Thanks & Regards,

Venkata Sreekanth

Anonymous
Not applicable
Author

Thanks a lot Venkata, your help is great.

I did many test, but as soon as I insert a simple set analysis in the formula, I loose the last column where I want to get the avg.


For example:

=IF(Dimensionality() = 0,

sum({$<sm.Réseaux_SMART={'BPF'}>}sm.Nombre_Smart),

sum({$<sm.Réseaux_SMART={'BPF'}>}sm.Nombre_Smart)

)