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.
Hello All,
My goal is to get the best and worst Jobsite by average inspection score of the jobsite. I am trying to get the desired result below:
Jobsite Table:
Jobsite: |
JobsiteA |
JobsiteB |
JobsiteC |
Jobsite Inspection Table:
Jobsites: | Inspection Score: |
JobsiteA | 98.04% |
JobsiteA | 89.14% |
JobsiteC | 92.35% |
JobsiteB | 100% |
JobsiteB | 75.86% |
JobsiteA | 91.55% |
JobsiteC | 88.91% |
Desired Results Table:
Jobsite: | Average Inspection Score by Jobsite: |
JobsiteA | 92.91% |
JobsiteB | 87.93% |
JobsiteC | 90.63% |
Desired Result Card:
Worst Jobsite by Average Score: JobsiteB
Best Jobsite by Average Score: JobsiteA
I have this measure, but it gives me the worst individual jobsite inspection score - not the worst average jobsite score.
WorstJobsite =
MINX(
TOPN(
1,
VALUES('Inspection Data'[Jobsite]),
CALCULATE(MIN('Inspection Data'[InspectionScore])), ASC
),
[Jobsite]
)
Could any advise how to get the desired result? Thank you in advance!
@datadmin-austin 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.
This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.
Hello @Greg_Deckler,
I am not sure what you are asking. In the question above, I have all my data and desired results.
Jobsite Table: List of Jobsites
Jobsite Inspection Table: List of inspection scores by jobsite (multiple inspections per jobsite)
Expect Result: Best and worst average inspection score by jobsite.
Let me know what I can provide to better help you understand the request. Thanks!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |