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: 
Anonymous
Not applicable

Need help on calculating percentage

Hello,

I have four rows and want to calculate percentage  on this rows.

Like below

R1

R2

R3

R4

In the R1 means 1st row and R2 means 2nd row............etc

The calculation should be like

(R4/Avg(R1+R2+R3))-1

Can anybody help me on this calculation

Regards,

Kumar

8 Replies
Anonymous
Not applicable
Author

use a preceding load

load

*,

(R4/Avg(R1+R2+R3))-1 as R4Perc;

load R1,

R2,

R3,

R4

from ..

Not applicable
Author

Hi try this,

load R1,

R2,

R3,

R4,

(R4/Avg(R1+R2+R3))-1 as Percentage

resident abc;

Anonymous
Not applicable
Author

These R1,R2............values are actually expressions. Pls see the screen shot.

The %change from average will be calculated like (R4/Avg(R1+R2+R3))-1


pokassov
Specialist
Specialist

Hello!

1. Add RowNo() as  ID into your table

2. only({$<ID={1}>} your_field)/avg({$<ID={2,3,4}>} your_field)-1

Anonymous
Not applicable
Author

These expressions are coming from more than 2 tables and in which table u want me in corporate this ID column. Can u explain me detail.

Regards,

kumar

jonathandienst
Partner - Champion III
Partner - Champion III

If you are doing this in a chart/table, then use

     <expression> - RangeAvg(Above(<expression>, 1, 3))

where <expression> is the expression to which the calculation should be applied.

Make sure that the table is correctly sorted and note that Above(0 automatically turns off interactive sorting

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

My actual requirement is

Expressions are calculated like


1)  =count(DISTINCT{$<[Site Visit Hit Source]={"<>5,7,8,9"}, [Site Visit Post Page Event] = {0}>} [Visitor ID])


2) =count(DISTINCT{$<[Site Visit Hit Source]={"<>5,7,8,9"}, [Site Visit Post Page Event] = {0}>} [Visitor ID]&'_'&[Site Visit Vis Num])


3) =sum({$<[Site Visit Hit Source]={"<>5,8,9"}, [Site Visit Post Page Event] = {0}>} [Site Visit Record Count])


like that the expressions are coming

if you see that highlighted fx, the value should be calculated like that and i want this one in table chart.

I want to add calculation at end of the table like shown in screen shot.

can u help me on this one.

Regards,

Kumar

Anonymous
Not applicable
Author

Hello Experts,

Can anybody help me on this issue.

Regards,

Kumar