I have a table storing PCP changes per patients over time (see blow). I would like to summarize the patients by their last PCP. I was able to get the last PCP by using the =FirstSortedValue(PCP_PROV_ID2,-PCPSTARTDATE) , but I cannot get the correct number of patients by last PCP. I have tried to use Calculated dimension, aggr() in expression even set analysis, but the numbers are not correct. Please help. The sample project is attached.
Another question is how to add patients who have no PCP to the chart?
Worked perfectly. Thanks
What does TOTAL <PAT_ID> do here. Without it, it returns more PCP records.
By the way, is there any way to add patients who have not PCP in the chart?