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: 
aaronnayan
Creator III
Creator III

How to calculate totals across a row?

Hi everybody!

I have a pivot table with data and i would like to have a total for the rows

Month   T-shirts          jeans          hoodies              Month Total

Jan         300              300              300                        900

Feb         400              430              420                        850

Mar         500              500              500                        1500



How do i calculate the "Month Total"? as an expression in a pivot table guys?

1 Solution

Accepted Solutions
hcabrera
Contributor III
Contributor III

Hi,

if T-shirts, jeans and hoodies are expressions you can create other expresion named Month Total  = [T-shirts] + [jeans] + [hoodies]

View solution in original post

6 Replies
vishsaggi
Champion III
Champion III

Pivot table chart properties -> Presentaion tab -> Check Show partial sums for Month Dim.

hcabrera
Contributor III
Contributor III

Hi,

if T-shirts, jeans and hoodies are expressions you can create other expresion named Month Total  = [T-shirts] + [jeans] + [hoodies]

aaronnayan
Creator III
Creator III
Author

Hi Vishwarath

when i click show partial sums it give me the totals for the expressions in the coloums not the rows?

Month   T-shirts          jeans          hoodies              Month Total

Jan         300              300              300                        ???   

Feb         400              430              420                        ???

Mar         500              500              500                        ???

                             

vishsaggi
Champion III
Champion III

Is this pivot table? If yes, just add your dimensions and expr as

Dim : Month, Tshirts, Hoodies, Jeans

Expr:

= Tshirts + Hoodies + Jeans

Capture.PNG

shiveshsingh
Master
Master

hi

use below expression

aggr(sum (Value),Month)

you will get the sum ..group by month..

trdandamudi
Master II
Master II

If your data is like below then you no need to create any extra columns with formulas:

Data:
Load * Inline [
Month,Type,Amount
Jan,T-shirts,300
Jan,Jeans,300
Jan,hoodies,300
Feb,T-shirts,400
Feb,Jeans,430
Feb,hoodies,420
Mar,T-shirts,500
Mar,Jeans,500
Mar,hoodies,500
]
;