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
i820017
Resolver II
Resolver II

Averages Slightly Off

I have data in an excel file that was exported from a Power BI Report from February 2023 as seen below.

i820017_0-1680030531150.png

When I calculate the Avg Score % by hand then I get an average = 95.00%

Each individual Average is calculated the DAX formula Score%5 (which is spelled out at the bottom)

 

 

However, when I take this same data, and make it into a bar chart, then I get an Avg of 94.53% as seen below

i820017_1-1680030719094.png

 

Here is the DAX Formula that yields 94.53% instead of 95.00%

Score%5 =
var Sales1    = AVERAGEX(SUMMARIZE (ININ,ININ[EmpID],ININ[RecordingDate]), CALCULATE(AVERAGEX(VALUES(ININ[EmpID]),DIVIDE(sum(ININ[AnswerScore]),sum(ININ[QuestionMaxScore])))))
var Service1  = AVERAGEX(SUMMARIZE (ININ,ININ[EmpID],ININ[RecordingDate]), DIVIDE(CALCULATE(AVERAGEX(VALUES(ININ[EmpID]),AVERAGE(ININ[Score]))),100))
return IF(Sales1 > Service1, Sales1, Service1)

 

Any idea on why I am getting 94.53% instead of 95.00%?

 

 

 

 

 

1 REPLY 1
Greg_Deckler
Super User
Super User

@i820017 Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, 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

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ 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...

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.