Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

pashok75
New Contributor II

how to get % of a sum figure in qlik

Dears

I need to get the % of production based on the sum figures of 4 dimensions.

 

CITYPRODUCTION%
A100016.66667
B200033.33333
C100016.66667
D200033.33333
TOTAL6000100


From the above table from the production figures i need to calculate the contribution of each city. How can I do it qlik chart.


Ashok

11 Replies

Re: how to get % of a sum figure in qlik

Perhaps this?

(Sum(PRODUCTION) / Sum(TOTAL PRODUCTION))*1000

Re: how to get % of a sum figure in qlik

Sum(Production)/Sum({<City=>}Total Production).

Regards

Regards,
Prashant Sangle
pashok75
New Contributor II

Re: how to get % of a sum figure in qlik

Actually the production is a variable

dimension is city

Production is $(vPremiumYTD)


How can i construct the statement.

Re: how to get % of a sum figure in qlik

Can you define your variable also vPremiumYTD

pashok75
New Contributor II

Re: how to get % of a sum figure in qlik

The Production is represented as vPremiumYTD

and the City is an dimension.

Re: how to get % of a sum figure in qlik

May be this?

(Sum($(vPremiumYTD)) / Sum(TOTAL $(vPremiumYTD)))*1000

pashok75
New Contributor II

Re: how to get % of a sum figure in qlik

Hi Anil,

the TOTAL you refer to any builtin QLIK field  as there is no field by name TOTAL. The dimension field name is CITY

Re: how to get % of a sum figure in qlik

use help menu.

TOTAL is qualifier

Search for topics and videos - Qlik | Help

Regards

Regards,
Prashant Sangle

Re: how to get % of a sum figure in qlik

Let's consider this as example

Name, Sales

A, 10

B, 20

C, 30

Sum(Sales) Returns

A, 10

B, 20

C, 30

Sum(TOTAL Sales)

A, 60

B, 60

C, 60

Community Browser