Forum Discussion
HYousuf
4 years agoNew Member
Subcategory analysis
Background: I have the following table. One patient is touched by several doctors (A, B, C) who perform various procedures (PA5, PA8, PA9, PA13). Usually PA13 precedes other ones, but not always, o...
v-yalanwu-msft
4 years agoCommunity Support
Hi, HYousuf ;
You could create measure as follow:
PA13 COUNT = CALCULATE(COUNT('Table'[Patient]),FILTER(ALLSELECTED('Table'),[Doctor]=MAX([Doctor])&&'Table'[Procedure]="PA13"))PA89 count =
var _pa13=SUMMARIZE(FILTER('Table',[Procedure]="PA13"),[Patient])
return COUNTROWS(SUMMARIZE(FILTER('Table',[Patient] in _pa13),[Patient]))
The final output is shown below:
If it is not correct, please share the scene you want to output (screenshot display)
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.