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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
    )
  )

 

 


Follow on LinkedIn
@ 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
    )
  )

 

 


Follow on LinkedIn
@ 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.