Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Logic Help aggregation

hi all

i have data like below

ID,Value

A,10

B,20

C,30

D,40

F,50

OutpuT required

ID,Value

A,10

B,20

C,30

D,40

F,50

E, Avg(A,B)

F, avg(C,F)

Regards

Abhay

8 Replies
girirajsinh
Creator III
Creator III

Hi Abhay

You may achieve same in two ways.

1. Use RESIDENT load and create two extra field and use 'if' condition for calculating Average for it.

2. while showing in chart, you may create "Calculated Dimension"

petter
Partner - Champion III
Partner - Champion III

E=15 and F=40

abhaysingh
Specialist II
Specialist II
Author

can you provide sample pls?

petter
Partner - Champion III
Partner - Champion III

Can you provide more context please?

girirajsinh
Creator III
Creator III

MK_QSL
MVP
MVP

Data:

Load * Inline

[

  ID,Value

  A,10

  B,20

  C,30

  D,40

  E,50

];

Load 'F' as ID, Avg(Value) as Value Resident Data Where Match(ID,'A','B');

Load 'G' as ID, Avg(Value) as Value Resident Data Where Match(ID,'C','D');

//Change value of ID according to your need.

abhaysingh
Specialist II
Specialist II
Author

can i achieve it in front end?

petter
Partner - Champion III
Partner - Champion III

Yes of course:

2017-01-14 11_08_51-Edit Script [C__Users_psd_Downloads_Test aggregation in script.qvw_].png

2017-01-14 11_08_25-Edit Expression.png