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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Sodared123
Frequent Visitor

How do i compute average score

Hi guys!

 

Need help on this.

Sodared123_0-1668740042627.png

I am trying to create a customer dashboard based on scoring of each customer. So when i filter to customer A for example, it will show a simple average of A score, B score and total of A and B score on card visuals. May i know what kind of measures or dax will make it possible?

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sodared123 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1669010254576.png

2. create three measure with below dax formula

Avg for A Score =
VAR cur_ct =
    SELECTEDVALUE ( 'Table'[Customer] )
VAR tmp =
    FILTER ( ALL ( 'Table' ), 'Table'[Customer] = cur_ct )
RETURN
    AVERAGEX ( tmp, [A Score] )
Avg for B Score =
VAR cur_ct =
    SELECTEDVALUE ( 'Table'[Customer] )
VAR tmp =
    FILTER ( ALL ( 'Table' ), 'Table'[Customer] = cur_ct )
RETURN
    AVERAGEX ( tmp, [B Score] )
Avg Score for Total = [Avg for A Score]+[Avg for B Score]

3. add a slicer with "Table[Customer]" column, add three card visual with above measure, add a table visual with fields

Animation17.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Sodared123 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1669010254576.png

2. create three measure with below dax formula

Avg for A Score =
VAR cur_ct =
    SELECTEDVALUE ( 'Table'[Customer] )
VAR tmp =
    FILTER ( ALL ( 'Table' ), 'Table'[Customer] = cur_ct )
RETURN
    AVERAGEX ( tmp, [A Score] )
Avg for B Score =
VAR cur_ct =
    SELECTEDVALUE ( 'Table'[Customer] )
VAR tmp =
    FILTER ( ALL ( 'Table' ), 'Table'[Customer] = cur_ct )
RETURN
    AVERAGEX ( tmp, [B Score] )
Avg Score for Total = [Avg for A Score]+[Avg for B Score]

3. add a slicer with "Table[Customer]" column, add three card visual with above measure, add a table visual with fields

Animation17.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Sodared123
Frequent Visitor

Hello guys! Any kind souls?

Sodared123
Frequent Visitor

Hi Amit

 

Not sure if you get my requirements right, based on below table date, if i filter for customer A, i will see 1.75 (average of 1.5 and 2) in A score card, 2.15 (based on average of 2.1 and 2.2) in B score card, and 3.9 in the total score card. In this case, how many measures should i be creating and what will the DAX look like? Thanks alot!

 

CustomerInvoice NumberA ScoreB Score

A

12341.5 
A2234 2.1
A33451.6 
A12552 
B13541.2 
B1288 2.5
C13443 
C1412 1.1
C11111.2 

 

 

 

amitchandak
Super User
Super User

@Sodared123 , Try like

 

Averagex(Summarize(Table, Table[Customer], Table[Invoice Number]), calculate(Sum(Table[A Score]) + Sum(Table[A Score]) ) )

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors