Forum Discussion
Arun Chandramouli
Jan 05, 2022Brass Contributor
Help with Formula/ Power query to get the number of matching row counts of codes
Hi All, Hope you are doing well!... I have the input data at a ctextid and a vbillid level...I also have the list of codes input by a human (agentcode) and the number of codes input by an automat...
SergeiBaklan
Jan 05, 2022Diamond Contributor
One more PQ variant is in attached file
- Arun ChandramouliJan 06, 2022Brass ContributorHi Sergei, Really appreciate your response...The only problem with this is that the percentages are going beyond 100 when the number of times the code is present in predictedcode is greater than the number of times the code is present in the agentcode...So the logic that I am looking to build is that for a unique code in the agentcode (Number of encounters that have the matching code in predictcode for the agent code)/ total number of encounters with code in the agent code column.. An encounter is a combination of ctext id and visitbillid... For example consider a agentcode C102 for an encounter (ctextid:3421 vbillid : 231) if the same code is present in predictcode for the same encounter(ctextid:3421 vbillid : 231 then the matching count is 1 ..(Numerator -> Number of matching counts for the code/ Denominator -> Number of times the code appears in the agentcode column)..Basically I am trying to calculate the precision for a particular agent code
- SergeiBaklanJan 06, 2022Diamond Contributor
Could you please generate sample file for testing of such behaviour. In current one I see nothing > 100% with current PQ logic as well as no agentcode C102 and ctextid:3421 you mentioned.
- Arun ChandramouliJan 07, 2022Brass Contributor
SergeiBaklan :Please find attached the input file where I have modified the input data and also updated the expected output data ; along with the output data from the existing code...Can you please help me here..
Thanks,
Arun