Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
israrkhan
Valued Contributor 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
MVP & Luminary
MVP & Luminary

Re: Straight Table Row Level Calculation....

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


talk is cheap, supply exceeds demand
5 Replies
MVP & Luminary
MVP & Luminary

Re: Straight Table Row Level Calculation....

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


talk is cheap, supply exceeds demand
MVP
MVP

Re: Straight Table Row Level Calculation....

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

israrkhan
Valued Contributor II

Re: Straight Table Row Level Calculation....

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
Valued Contributor II

Re: Straight Table Row Level Calculation....

Gysbert Great...

Many Thanks....

Partner
Partner

Re: Straight Table Row Level Calculation....

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.