Forum Discussion
My Countdistinct Total is not summing correctly
- 5 years ago
OK, you should avoid implicit measures, this is a measure where you drag a field from a table into a view then pick "Summarize By": Count. Instead you want to write a measure that does what you want, that way you can use it other places.
So, New Measure.
Patient Count = DISTINCTCOUNT ( vw_???_DocAudit[PatientName] )Then we make the next one that sums correctly.
Patient Count Totaling = SUMX ( VALUES ( vw_???_DocAudit[ProcedureCode] ), [Patient Count] )The second measure uses the first one we made.
You should end up with something like this (we call them claimants rather than patients):
- jdbuchanan715 years ago
Super User
You need a measure for [Patients Seen] which will be something like
Patients Seen = DISTINCTCOUNT ( vw_???_DocAudit[PatientID] )You are better off counting a unique ID rather than a name incase some patients have the same name. Then you use that measure in your sum version.
Patients Seen Sum = SUMX ( VALUES ( vw_???_DocAudit[PatientName] ), [Patients Seen] )- jonnyA5 years ago
Responsive Resident
jdbuchanan71 I tried your suggestions, however, the total sum is still incorrect.
- jdbuchanan715 years ago
Super User
That is not enough information for me to help you. You need to show me the measures you have used and the category of data you are trying to slice it up by.