Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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!
User | Count |
---|---|
136 | |
70 | |
69 | |
54 | |
53 |
User | Count |
---|---|
207 | |
94 | |
64 | |
61 | |
57 |