Forum Discussion
Counting the number of Diagnosis codes by context ,Specialty and provider-HelpwithPowerQuery/formula
- May 07, 2021
Arun Chandramouli Please see the attached file containing a PQ solution in the Output sheet. I have also noticed some discrepancies, probably caused by the fact that you created the example output manually.
The query is fairly standard, except for one little trick that allows you to split the "Diagnosis code" column based on the maximum number of elements in any given field. I picked it up from a video by Wyn Hopkins not too long ago.
Thanks for the reference Riny_van_Eekelen
There's actually a simpler way using Split Text to Rows option under Advanced
Wyn Hopkins Will keep that in mind for next time 🙂
- Arun ChandramouliMay 07, 2021Brass ContributorHi Riny,Just one more question: If I want to count a diagnosis code only once per row irrespective of the number of times it appears in a row and the arrive at the count stats ..Can you please help me with that...
- Riny_van_EekelenMay 07, 2021Platinum Contributor
Arun Chandramouli Not sure I follow. You mean that if, for instance, E1 in the table has two entries for the same diagnose, you only want to count it once?
- Arun ChandramouliMay 07, 2021Brass ContributorHi Riny, Yes I meant the same...At a row level if a diagnosis code is present twice or thrice I want to count it only once...