Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

tomhovens
New Contributor II

Need some help with Set Analysis

Hi All,

I'm trying to create a function to calculate an average of 461nm VIS based on specific values.

Rangnr is the rank per record 1,2,3 etc.

2880 is an solid number but the next number 4647 is a function avg(Rangnr)

avg({1<Rangnr={">2880<=4647"}>}461nmVis)

4647 is a dynamic number and will change based on the amount of data

Tags (1)
1 Solution

Accepted Solutions

Re: Need some help with Set Analysis

May be this:

Avg({1<Rangnr={">2880<=$(=Avg(Rangnr))"}>}461nmVis)

2 Replies

Re: Need some help with Set Analysis

May be this:

Avg({1<Rangnr={">2880<=$(=Avg(Rangnr))"}>}461nmVis)

MVP
MVP

Re: Need some help with Set Analysis

To avoid a misinterpretation of a potentially returned floating point value from the avg(), use an additional Floor() function:

Avg({1<Rangnr={">2880<=$(=Floor(Avg(Rangnr)))"}>}461nmVis)

edit: Any you may want to also use set identifier 1 in the avg() function;

Avg({1<Rangnr={">2880<=$(=Floor(Avg({1} Rangnr)))"}>}461nmVis)

Community Browser