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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Luke_Howells
Helper I
Helper I

Count of Sites Where Average Audit Score is Greater Than . . .

Hi Everyone,

 

I am very new to Power BI so some of this stuff may seem very simple. I am trying to get a count of the number of sites where the average audit score is greater than 8.50. There are multiple entries for each site and the audit score column does contain blanks, if this makes any difference. I've added below a little snippet if it helps. I have had to blur out the site name for confidentiality reasons. 

Can someone help?

 

Capture (1).png

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

First, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Second, you probably want:

Measure = 
  COUNTROWS(
    FILTER(
      SUMMARIZE(
        'Table',
        [Site Name],
        "__Average",AVERAGE('Table'[Audit Score])
      ),
      [__Average] > 8.5
    )
  )

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @Luke_Howells ,

 

At first, you need to create a measure to calculate average number based on site name.

Measure =
CALCULATE (
    AVERAGE ( 'Table'[Audit Score] ),
    FILTER (
        ALLEXCEPT ( 'Table', 'Table'[Site Name] ),
        'Table'[Audit Score] <> BLANK ()
    )
)

Then get the number with the condition ">=8.5".

Measure 2 =
CALCULATE (
    DISTINCTCOUNT ( 'Table'[Site Name] ),
    FILTER ( 'Table', [Measure] >= 8.5 )
)

 

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Greg_Deckler
Super User
Super User

First, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Second, you probably want:

Measure = 
  COUNTROWS(
    FILTER(
      SUMMARIZE(
        'Table',
        [Site Name],
        "__Average",AVERAGE('Table'[Audit Score])
      ),
      [__Average] > 8.5
    )
  )

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Watsky
Solution Sage
Solution Sage

 

 

 

@Luke_Howells 

 

Assuming that Audit Score is a measure and you're looking to create a measure that gives you the count you could try this:

 

 

 

Measure = 
VAR AUD = [Audit Score]
RETURN
 CALCULATE(count([Site Name]),FILTER(Table Name,AUD > 8.50))

 

 

 


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

JCPO
Helper I
Helper I

Hi Luke,

 

I assume you need this type of table?

 

Capture9.PNG

 

Steps: 

1. Click the Modelling Tab

 

2. Choose Create new Column

 

3. In the Dax Query, input this formula (very similar to Excel)

*Qualifier = if('Table'[Score]>8.5,"Passed",if('Table'[Score] = BLANK(),"No Data","Failed"))

 

4. Create a Matrix from the Visualizations pane. In the values row, drag each column to their respective fields.

Make sure to use distinct count for the values fields. 

Capture111.PNG

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.