Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pashok75
Contributor II
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
Anil_Babu_Samineni

Perhaps this?

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

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
PrashantSangle

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

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
pashok75
Contributor II
Contributor II
Author

Actually the production is a variable

dimension is city

Production is $(vPremiumYTD)


How can i construct the statement.

Anil_Babu_Samineni

Can you define your variable also vPremiumYTD

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
pashok75
Contributor II
Contributor II
Author

The Production is represented as vPremiumYTD

and the City is an dimension.

Anil_Babu_Samineni

May be this?

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

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
pashok75
Contributor II
Contributor II
Author

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

PrashantSangle

use help menu.

TOTAL is qualifier

Search for topics and videos - Qlik | Help

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anil_Babu_Samineni

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

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