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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pivot table to show average in partial sums

Hi,

Appreciate any help on this.

The below table is what i am trying to achieve. I need the AVERAGE column beside the Total column.

Pivot Table - Average field.png

I achieve the below, but i do not need the average column for all dimension Dim2. Only need the last AVERAGE column.

Pivot Table - Average field1.png

Please advise me!

3 Replies
Anil_Babu_Samineni

Can you send sample to work, This will works and lot make sense.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
marcus_sommer

There are two possibilities - one is to add an extra field-value in Dim2 and the another is to use respectively to create a further dimension Dim3 above your Dim2 either by using a superior-group or just by typing a string like 'All available values of Dim2' into a calculated Dim3.

The next then would be to query this additionally fieldvalue like: if(Dim2 = 'avg Dim2', avg(value), sum(value)) or by the dimension-version with: if(secondarydimensionality() = 0, avg(value), sum(value))

- Marcus

sunny_talwar

Something along these lines:

How to suppress 0 in expression