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: 
Not applicable

values/Total in pivot table

Hi Experts,

i have the following tables,

BRANCH:

LOAD DISTINCT

  BRNO,

  SALESREPORTS,

  Year(Date) as AGE

FROM [BRANCH.qvd](qvd);


Sales:

LOAD BRNO,

     DATE,

    Amount

FROM

[SALES.qvd]

(qvd);

from this, i have produced the following pivot table,

test1.JPG

Now, i need to add another expression as Share.

formula is Share = Amount/Total (i.e., for age 2010, the share is 25896/185429 = 13.96%)

How can i do this in a pivot table.

plsss help.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Are you using more than one dimension, which you are not showing in above screenshot?

Then you may need to use a field list with your TOTAL qualifier, something like

=Sum(Amount) / Sum(TOTAL<OtherDimField> Amount)

View solution in original post

12 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try with

Sum(amount)
/
Sum(TOTAL amount)

let me know

swuehl
MVP
MVP

=Sum(Amount) / Sum(TOTAL Amount)

You can format the number on number tab as percentage.

sunny_talwar

Alessandro Saccone solution should work, just need to make sure that Amount has a upper case A because QV is case sensitive.


Sum(Amount)
/
Sum(TOTAL Amount)

HTH

Best,

Sunny

Not applicable
Author

Hi,

i m trying this,

SUM({<MonthYear=, Date={"$(vCurrYr)"}>}Amount)/SUM(TOTAL{<MonthYear=, Date={"$(vCurrYr)"}>}Amount)

i m not getting correct values.

Pls help.

is the expression correct?

Not applicable
Author

Hi,

i m trying this,

SUM({<MonthYear=, Date={"$(vCurrYr)"}>}Amount)/SUM(TOTAL{<MonthYear=, Date={"$(vCurrYr)"}>}Amount)

i m not getting correct values.

Pls help.

is the expression correct?

sunny_talwar

I don't see any problem with your expression. Can you share may be a sample or a screenshot of what you getting?

swuehl
MVP
MVP

Are you using more than one dimension, which you are not showing in above screenshot?

Then you may need to use a field list with your TOTAL qualifier, something like

=Sum(Amount) / Sum(TOTAL<OtherDimField> Amount)

Not applicable
Author

Hi,

i m getting this

test2.JPG

but the value should be

tes.JPG

pls help

Not applicable
Author

Hi Swuehl,

Tried this,

SUM({<MonthYear=, Date={"$(vCurrYr)"}>}Amount)/SUM(TOTAL<{<MonthYear=, Date={"$(vCurrYr)"}>}Amount>)

but getting NULL values.

is my expression wrong?

pls help