Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
miltenburger
Helper V
Helper V

Get average from filters

Hi Guys,

 

I'm trying to work out an issue.

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

 

 

 

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

 

Thanks in advance

4 REPLIES 4
MFelix
Super User
Super User

Hi @miltenburger,

 

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


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix

Thanks for your fast reply.

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?

Anybody else got any ideas how to do this?

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

Anyone?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.