Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Solution

Accepted Solutions
giakoum
Partner - Master II
Partner - Master II

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
jonathandienst
Partner - Champion III
Partner - Champion III

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
giakoum
Partner - Master II
Partner - Master II

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

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