Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

aaronnayan
Contributor 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
Highlighted
hcabrera
New Contributor III

Re: How to calculate totals across a row?

Hi,

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

6 Replies
vishsaggi
Esteemed Contributor III

Re: How to calculate totals across a row?

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

Highlighted
hcabrera
New Contributor III

Re: How to calculate totals across a row?

Hi,

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

aaronnayan
Contributor III

Re: How to calculate totals across a row?

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
Esteemed Contributor III

Re: How to calculate totals across a row?

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
Honored Contributor

Re: How to calculate totals across a row?

hi

use below expression

aggr(sum (Value),Month)

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

trdandamudi
Honored Contributor II

Re: How to calculate totals across a row?

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
]
;