Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
hi
I am trying to create a total possible score for each evaluation. The total can be different for each evaluation due to N/a marking for some criteria.
I have this example data from my report.
The first table is so evaluation results named QualityData and the second table is the max possible score for each section named MarkReference..
| Evaluation Date (dd/mm/yyyy) | Agent | 2.1 | 2.2 | 2.3 | 3.1 | 3.2 | 3.3 | 4.1 | 4.2 | 5.1 | 5.2 | 5.3 | 5.4 | 5.5 | 6.1 | 6.2 | 6.3 | 6.4 | 7.1 | 7.2 | 7.3 |
| 15/01/2025 0:00 | Same Person | 3 | 5 | 3 | 10 | 7 | 3 | 5 | 7 | 5 | 10 | 10 | 10 | 7 | 3 | 3 | 3 | 3 | 4 | 4 | 4 |
| 16/01/2025 0:00 | Same Person | 3 | 5 | 0 | 10 | 7 | 3 | 5 | 0 | 10 | 10 | 10 | 7 | 3 | 3 | 3 | 0 | 4 | 4 | ||
| 17/01/2025 0:00 | Same Person | 3 | 0 | 3 | 10 | 0 | 3 | 5 | 7 | 0 | 10 | 10 | 10 | 7 | 3 | 0 | 3 | 3 | 4 | 4 |
SectionMark
|
What I am trying to do is sum the sections in MarkReference table for each evaluation filtering out the sections that are blank in the QualityData table. So that for this person I should end up with a result set like this.
| Result | Possible score | |
| 109 | 109 | |
| 87 | 100 | |
| 85 | 105 | |
| Totals | 281 | 314 |
This is the formula I am using
Possible Score = CALCULATE(SUMX(MarkReference,MarkReference[Mark]),FILTER(QualityData, QualityData[Value] <> BLANK()))
and tried this version also without success. It keeps summing up the filter not the table sumx is on.
Max Score = CALCULATE(SUMX(RELATEDTABLE(MarkReference), [Mark]), FILTER(QualityData, QualityData[Value] <> BLANK()))
It doesn't sum MarkReference however, it sums the filter value and I am returned the Result values instead of the Possible Score values as in the table above.
How can I acheive this?
Solved! Go to Solution.
Hi
Please follow below steps to achieve expected results.
Step 1 :-
Unpivot section columns from QualityData Table using Power Query. so, that you will get all sections in one column.
Step 2:-
Then create relationship between both table using Section Column. one to Many Relationship
Step3 :-
You will get correct results for Actual Score without any context modification
Step 4:
For getting Possible Score, Use below formula.
Hi @HankScorpio2,
Any update on this? Did these suggestions suitable with your requirement?
Regards,
Xiaoxin Sheng
Hi @HankScorpio2 ,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information and description to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi
Please follow below steps to achieve expected results.
Step 1 :-
Unpivot section columns from QualityData Table using Power Query. so, that you will get all sections in one column.
Step 2:-
Then create relationship between both table using Section Column. one to Many Relationship
Step3 :-
You will get correct results for Actual Score without any context modification
Step 4:
For getting Possible Score, Use below formula.
1. Data Preparation
Ensure Consistent Data Types: Make sure the Value column in QualityData and the Mark column in MarkReference are of the same data type (e.g., both numbers).
Clear Relationships: Define a clear relationship between the two tables. This relationship should be based on the Section column (assuming you have a Section column in both tables to link them).
2. DAX Formula
Possible Score =
CALCULATE(
SUM(MarkReference[Mark]),
FILTER(
MarkReference,
RELATED(QualityData[Value]) <> BLANK()
)
)
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 39 | |
| 35 | |
| 23 |