Forum Discussion
Hell-1931
3 years agoHelper II
Calculating values for Cross Matrix table in Power BI DAX
I have the following table, which shows how many MH(Mental Health type) - SA (Substance Abuse type) diagnosis for a particular client: Diagnosis: I also have a measure, which calculates...
- Anonymous3 years ago
Hi Hell-1931 ,
Please try this measure.
Measure = VAR _ADDCOLUMN = ADDCOLUMNS('Table',"Flag",IF([Diagnosis_Desc] = MAX(MH[Diagnosis_Desc]) || [Diagnosis_Desc] = MAX(SA[Diagnosis_Desc]),1,0)) VAR _SUMMAIZE = SUMMARIZE(_ADDCOLUMN,[ClientID],"Sum",SUMX(FILTER(_ADDCOLUMN,'Table'[ClientID] = EARLIER('Table'[ClientID])),[Flag])) RETURN COUNTAX(FILTER(_SUMMAIZE,[Sum]=2),[ClientID]) + 0Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hell-1931
3 years agoHelper II
Thank you, I'll try tonight