Forum Discussion
Wrong Total in Matrix while using Distinctcount
- 4 years ago
Hi, Anonymous ,
The reason is because your deduplicated number is 35 in course 1 and 33 in course 2. This is no problem, however in course 1 and in course 2 you have the same [Employee ID]; courses 3, 4, 5 is like this. But the total is the deduplicated sum of all the courses. If you wish to change the total, you need to write the following measure:
Unique Trained = VAR _dis = CALCULATE ( DISTINCTCOUNT ( 'Employee Data_Raw'[Employee ID] ), FILTER ( 'Employee Data_Raw', [Attended] = "Yes" ) ) RETURN IF ( ISINSCOPE ( [Programme] ), _dis, SUMX ( SUMMARIZE ( 'Employee Data_Raw', [Programme], [cource name], "1", _dis ), [1] ) )if you want to change the every row's value. may be should remove the cource name.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous ,
The reason is because your deduplicated number is 35 in course 1 and 33 in course 2. This is no problem, however in course 1 and in course 2 you have the same [Employee ID]; courses 3, 4, 5 is like this. But the total is the deduplicated sum of all the courses. If you wish to change the total, you need to write the following measure:
Unique Trained =
VAR _dis =
CALCULATE (
DISTINCTCOUNT ( 'Employee Data_Raw'[Employee ID] ),
FILTER ( 'Employee Data_Raw', [Attended] = "Yes" )
)
RETURN
IF (
ISINSCOPE ( [Programme] ),
_dis,
SUMX (
SUMMARIZE ( 'Employee Data_Raw', [Programme], [cource name], "1", _dis ),
[1]
)
)
if you want to change the every row's value. may be should remove the cource name.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.