Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Average Formula in Qlik Sense

Hi All,

I wan to get average of my this total value. The formula giving me error. What I am doing wrong here?

Avg(sum([VisitA])+sum([VisitB])+sum([VisitC]))

How can I get  the average  in my formula for my measure. Thanks

8 Replies
MVP
MVP

Re: Average Formula in Qlik Sense

You need to use Aggr() function

Avg(Aggr(sum([VisitA])+sum([VisitB])+sum([VisitC]), <Dimension/sHere>))

Not applicable

Re: Average Formula in Qlik Sense

Hi Thanks.

I used the following formula, but its doesn't give me any result.

Avg(Aggr(sum([VisitA])+sum([VisitB])+sum([VisitCt]), <[MDate.autoCalendar.Fiscal Quarter],[MDate.autoCalendar.Fiscal Year]>))

  I used Measure

sum([VisitA])+sum([VisitB])+sum([VisitC]) and

Dimensions ,[MDate.autoCalendar.Fiscal Quarter,] [MDate.autoCalendar.Fiscal Year] for

other chart and trying the same for average.

MVP
MVP

Re: Average Formula in Qlik Sense

<> were just to highlight, not needed in the expression

Avg(Aggr(sum([VisitA])+sum([VisitB])+sum([VisitCt]), [MDate.autoCalendar.Fiscal Quarter],[MDate.autoCalendar.Fiscal Year]))

Not applicable

Re: Average Formula in Qlik Sense

Thanks. the formula gives result same as total. No as average.

MVP
MVP

Re: Average Formula in Qlik Sense

Would you be able to share a screenshot?

Not applicable

Re: Average Formula in Qlik Sense

Left chart has measure with only total formula and same dimension. Right one has average formula same dimension

MVP
MVP

Re: Average Formula in Qlik Sense

Not sure what you are expecting to see when you dimensions are the same? May be you want

Avg([VisitA]) + Avg([VisitB]) + Avg([VisitCt])

Not applicable

Re: Average Formula in Qlik Sense

Actually I need     Avg([Follow-Up]+[Initial Visit]+[Indirect])

This solved my problem. Thanks