Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
Not applicable

Calculate average in pivottable

Hi there,

i want to calculate a average of a factor in a column of a pivottable, irrespective of users selection.

Actually i have this in the formula for the calculation: 

avg(if(datum_test>=vStartDatum and datum_test<=vEndeDatum, fr_faktor1))

If field "factor" in table "factor_ratenschema" not filled, use the factors of last 5 networkdays.
Irrespective of users selection.

Hope somebody can help me.

Regards

Sabrina

Tags (1)
1 Solution

Accepted Solutions
Partner
Partner

Re: Calculate average in pivottable

Maybe it is because of the if statement. Replace it with set analysis (not very clear though):

avg({<datum_test={">=$(vStartDatum)<=$(vEndeDatum)"}>} fr_faktor1)

View solution in original post

2 Replies
MVP
MVP

Re: Calculate average in pivottable

I suggest that you post a sample qvw to enable more accurate help.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Partner
Partner

Re: Calculate average in pivottable

Maybe it is because of the if statement. Replace it with set analysis (not very clear though):

avg({<datum_test={">=$(vStartDatum)<=$(vEndeDatum)"}>} fr_faktor1)

View solution in original post