# New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
New Contributor II

## Average calculation over dimension

Hi,

I am trying to calculate overall average over a dimension.As shown in below table how to calculate avg for Count column and display same overall average for all dates.Tried Aggr and avg in expression but no luck.

Labels (1)
• ### Qlikview

1 Solution

Accepted Solutions
Partner

## Re: Average calculation over dimension

Hi!

The following expression does what you need:

``````Sum(Total Aggr(Count(Value), Name, Date))
/
(Count(Total Aggr(Count(Value), Name, Date)) - 1)``````

Regards,

Jaime.

5 Replies
Valued Contributor

## Re: Average calculation over dimension

please provide a sample of input and desired output

Partner

## Re: Average calculation over dimension

Hi!

I am not sure if I understood your issue but I think that the following expresion may work:

``Avg(Total Aggr(Count(Value), Name, Date))``

Where I supposed that your count expression is "Count(Value)". Please, use your correct count expression above. I get the following output:

Hope it helps! Regards,

Jaime.

New Contributor II

## Re: Average calculation over dimension

Thanks @jaibau1993  it worked added dimension after Total.I want to make small change to avg.In numerator I want to consider all records (4 records as shown) for Avg but divided by 3 instead of 4.So for ABC I want to show 10/3=3.33 instead of 10/4=2.5.thanks in advance

``Avg(Total<Name> Aggr(Count(Value), Name, Date))``

Partner

## Re: Average calculation over dimension

Hi!

The following expression does what you need:

``````Sum(Total Aggr(Count(Value), Name, Date))
/
(Count(Total Aggr(Count(Value), Name, Date)) - 1)``````

Regards,

Jaime.

New Contributor II

Thanks.It worked