Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
DanCasSan
Contributor III
Contributor III

sum of the average

Hi, I have this formula, but it doesn't work when I do a year and month filter. Does anyone know how to restructure said formula or why it doesn't work?

Avg(Aggr(Sum({<[Tiempo.Año]={">=$(vMaxAño10)<=$(vMaxAñoAnterior)"},[Tiempo.Mes numérico]={"<$(vMaxMes)"}>}  [Precipitación]),[Tiempo.Año],[Descripción Puesto],[Sociedad.Sede Agrícola]))

I'm grateful for any help.

Cheers,

DC

1 Solution

Accepted Solutions
rubenmarin

Hi, you also need to add set analysis to the external Avg()

Avg({<[Tiempo.Año]={">=$(vMaxAño...>} Aggr(...

View solution in original post

3 Replies
rubenmarin

Hi, you also need to add set analysis to the external Avg()

Avg({<[Tiempo.Año]={">=$(vMaxAño...>} Aggr(...

vinieme12
Champion III
Champion III

try to base your calculations on the Datefield instead

[Datefield]={">=$(=Date(yearstart(Max([Datefield]),-10)))<=$(=Date(yearend(Max([Datefield]),-1)))"}

 

What is the definition for these variables ? 

vMaxAño10

vMaxAñoAnterior

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
DanCasSan
Contributor III
Contributor III
Author

Thanks for the help, you're a boss it worked perfectly for me. 😎

Regards,

DC