Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

Not applicable

How to get the average of certain rows

How can i calculate the average value of certain rows?
as for example i want to calculate the average VALUE between start1 and end1 which is the average of (4, - , 5, 3, 4, 5) and the average value between start2 and end2 which is the average of (8, 8, 9, 7, 9, 8).

eventValue
start 1
process4
action
reaction5
end 1
start 2
process8
action8
reaction9
end 2
start 1
process3
action4
reaction5
end 1
start 2
process7
action9
reaction8
end 2
Tags (2)
1 Reply

Re: How to get the average of certain rows

Create an event number field:

LOAD

     event,

     Value,

     If(wildmatch(event, 'start*'), autonumber(event), peek('event_no')) as event_no

FROM

     ....;

Then use that field as dimension and avg(Value) as expression in a chart.


talk is cheap, supply exceeds demand
Community Browser