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

Chart Avarage

Dear All

I have created below pivot chart .

Open
  Documents
StatusCountAmountAgeing
DOC1Status11823,218,49827
DOC1Status2771,276,4062
DOC1Status218210,9818
DOC1Total2774,705,88519
DOC2Status1125,27627
DOC2Total125,27627
Total 2784,731,16119

where in Ageing is calculates as :

avg(Today()-[Upload date])

At the total row the average is not coming accurate. Hignlighted in bold.

In first case it should be 12.

Thanks in advance.

5 Replies
ashwanin
Specialist
Specialist

You are using Upload date in Aging.

Please check, what is the last Uploaded Date.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

12 is a simple average of the 3 numbers, whereas 19 is the correct weighted average of the underlying data. If for some reason, you need the simple average, then you need to do something like this:

=Sum(Aggr(Avg(<your age expression>),[Open Documents],Status))

(insert your expression for age; the aggr() needs all the dimensions in your chart)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
anbu1984
Master III
Master III

Can you post sample app

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try including Update Date as dimension in the chart?

Regards,

Jagan.

Not applicable
Author

HI All

Thanks for suggetions.

Had made small change in formula and used like this

if(Dimensionality()=0,avg(Today()-[Upload date]), avg(aggr(avg(Today()-[Upload date]),Status,Open Documents)))

which is giving perfect result.

Open
  Documents
StatusCountAmountAgeing
DOC1Status11823,218,49827
DOC1Status2771,276,4062
DOC1Status318210,9818
DOC1Total2774,705,88513
DOC2Status1125,27627
DOC2Total125,27627
Total 2784,731,16119