cancel
Showing results for
Did you mean:
Member

## Get average from filters

Hi Guys,

I'm trying to work out an issue.

I've got severel filters on my report (see photo)

So filter 1: choose from 1 to 5

Filter 2: choose from 1 to 5

And so on,

Is it possible to get the average number from these filters? So for the photo the average should be 3.5

4 REPLIES 4
Super User

## Re: Get average from filters

Try something like this:

```Average =
DIVIDE (
(
CALCULATE ( SUM ( a[a] ), ALLSELECTED ( a[a] ) )
+ CALCULATE ( SUM ( b[b] ), ALLSELECTED ( b[b] ) )
),
(
CALCULATE ( COUNT ( a[a] ), ALLSELECTED ( a[a] ) )
+ CALCULATE ( COUNT ( b[b] ), ALLSELECTED ( b[b] ) )
)
)```

Regards,

MFelix

Proud to be a Datanaut!

Member

## Re: Get average from filters

Hi @MFelix

I used following code (because all my filters are based on factCompetentieniveau[cijfer], i did following:

`NewAverage = DIVIDE(CALCULATE(sum(factCompetentieniveau[Cijfer]);ALLSELECTED(factCompetentieniveau[Cijfer]));CALCULATE(COUNT(factCompetentieniveau[Cijfer]);ALLSELECTED(factCompetentieniveau[Cijfer])))`

When i put my measure on a text box it gives me the value: blank

Got any ideas?

Member

## Re: Get average from filters

Anybody else got any ideas how to do this?

Maybe it's not even possible, i'm not sure..?

Member

Anyone?