Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

how to calculate percentage for each row

Hi All,

          How to calculate percentage for each row i mean ,let say if data is like below

                plant  xxx   yyy   zzz    vvvv

                mah    10      20     20       40  

                 try      20       30      40      50  

what i am looking is

            

                    plant  xxx                               yyy                                          zzz                                                   vvv

                     mah   10/10+20+20+40            20/10+20+20+40                      20/10+20+20+40                               40/10+20+20+40

                      try       20/20+30+40+50            30/20+30+40+50                     40/20+30+40+50                             50/20+30+40+50

so each row should have 100%

thanks

1 Solution

Accepted Solutions
Anil_Babu_Samineni

You can use like below, May be?

Sum(Sales) / Sum(Total Sales)

OR

Sum(Sales)/Sum(TOTAL <plant> Sales)

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

View solution in original post

5 Replies
kunkumnaveen
Specialist
Specialist
Author

plant  xxx                               yyy                                          zzz                             vvv

mah   10/10+20+20+40            20/10+20+20+40                      20/10+20+20+40          40/10+20+20+40

try       20/20+30+40+50            30/20+30+40+50                    40/20+30+40+50         50/20+30+40+50

Anil_Babu_Samineni

You can use like below, May be?

Sum(Sales) / Sum(Total Sales)

OR

Sum(Sales)/Sum(TOTAL <plant> Sales)

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
sunny_talwar

Is this a pivot table with 2 dimensions and 1 expression or a straight table with one dimension and multiple expressions?

kunkumnaveen
Specialist
Specialist
Author

Hello sunny

Pivot table with 2 dimension and 1 expression

Dimension:

1)plant

2)delivery term

sunny_talwar

Then this expression from Anil should work

Sum(Sales)/Sum(TOTAL <plant> Sales)