Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
arethaking
Creator II
Creator II

How to achieve Total and Average in same straight/pivot table?

How to achieve Total and Average in same straight/pivot table?

Capture.PNG

1 Solution

Accepted Solutions
tresesco
MVP
MVP

If you can afford to create a new value in Product dimension as 'Average', you can do that like in attached qvw:

Capture.PNG

If( Product='Average', Avg(total Sales),sum(Sales))

View solution in original post

7 Replies
devarasu07
Master II
Master II

Hi,

What is issue are you getting? just Create a straight/Pivot table with Product as dimension,

Sum(Sales) & Avg(Marks) as expression. Tks

Capture.JPG

Anonymous
Not applicable

Hi

Write two expressions Sum(Sales) and Avg(Sales) and use Product as dimension. It will work. If this is not you are expecting elaborate more.

Hope it helps!!

Anil_Babu_Samineni

We can achieve same in Pivot Table like Straight table, But, you have to make some changes in options like

Change it to Pivot Table then SubTotal should be on Top(From Presentation tab) and Remove Total and use space for partial sum. Same as Second one

Capture.PNG

Changes done here

Capture.PNG

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
arethaking
Creator II
Creator II
Author

Hi All,

I want to show Total and Average in the same column in different rows.

How to achieve this?

Capture.PNG

RonaldDoes
Partner - Creator III
Partner - Creator III

Hi Aretha,

You might want to add a statistics box.

This will however nog show all values as in your example.

Naamloos.png

Hope this helps you.

With kind regards,

Ronald

tresesco
MVP
MVP

If you can afford to create a new value in Product dimension as 'Average', you can do that like in attached qvw:

Capture.PNG

If( Product='Average', Avg(total Sales),sum(Sales))

arethaking
Creator II
Creator II
Author

Wow ... Great sir tresesco