Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
israrkhan
Specialist II
Specialist II

Straight Table Row Level Calculation....

Hello Community,

i have a straight table with one dimension, and two expressions

let say i have country | Budget | Actual | %

in the percent column, i have to calculate the %, and formula is first value of Actual, will be divided by all other values in the down rows..

first row will be empty

120/ 1200 for the second row of %, which is B

170/ 1200 for the third row in % column, which is C

200/1200 for the fourth row in % column... so on

till the end, i have 10 rows fixed...

your help will be highly appreciated,,i am stuck here.. kindly help

Header 1Header 2Header 3Header 4
CountryBudgetActual%
A10001200100 fixed...
B100120120/1200= ? 
C130170170/1200 =?
D150200200/1200 = ?
E80130130/1200 = ?
F90149149/ 1200 = ?
1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try sum(Actual)/top(sum(Actual))


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

Try sum(Actual)/top(sum(Actual))


talk is cheap, supply exceeds demand
MK_QSL
MVP
MVP

SUM(Actual)/Max(TOTAL Aggr(SUM(Actual),Country))

israrkhan
Specialist II
Specialist II
Author

Helpful reply,

but may be all the time first value will not be maximum,,,

may be first value is 1000 and second is 1200...

thanks

israrkhan
Specialist II
Specialist II
Author

Gysbert Great...

Many Thanks....

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Try this in the expression tab

Num(Sum(Actual) / Sum(TOTAL Actual),'#,#0.00')

This will give you % based upon sum of Actual field, so in your example, your Actual will equal 1969. So each row will be, i.e. 1200/1969 = 0.61.

My question is do you want your % calculated on row above of the total of Actual?

I know this has been answered but something to think about.