Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
chapil
Contributor III
Contributor III

avg with an aggr function - deal with null values

hy everyone ! 

I'm trying to have an average of an aggregate function. 

I want to calculate all my amout for which my conditions are true so I did a set analysis  

With my kpi object, I have the wrong result : without the zero values. 

chapil_0-1640785359460.png

So I would like to find the write result which is 64,83 

 

Thanks for your help 

 

 

PS : this is my formula 

     Avg({<[REGION]>}
      Aggr(fabs(
      sum({<Flag_Fait={'F_'} ,
      MONTH =,
      [CODE]= {"$(=GetFieldSelections([CODE] ,',', 1000))"},
      [DATE] = {"<$(=date(addmonths(date(today(), 'DD/MM/YYYY'), -$(i) 
       ),'DD/MM/YYYY'))"},
      [REGION]>} AMOUNT
      ))
      // pour prendre en compte également les comptes à 0 j'ajoute ceci: 
     ,[REGION]))

 

 

0 Replies