Hi,
I attempted to create a DAX Formula to get the average for "no" and "yes" string; however, I received an error. This is the error: The function average takes an argument that evaluates to numbers or data and cannot work with values of type String. Our section supervisors review patients' records to ensure clerks have verified a patient's demographic by indicating "no" or "yes". I want to great a measure to get the average of "no" and "yes". I attach an example of the workbook. Please provide insight how to resolve issue.
Please clarify which averages you expect to see if you were to calculate them manually.
Sorry for the delay. Both for "no" and "yes" replies.
What I meant is that you need to explain how you would calculate such an average.
Riny, hi, I'm back. It has been tasking to close out the fiscal year 2024 and start a new fiscal year for 2025 (October 1). My understanding Excel does not have a built-in function to calculate an average based on text (yes or no). If a numerical value was assigned, yes=1 and no=2, would this be a solution?
Maybe, but I still don't understand. If 'Yes' would become 1 and 'No' would be 2, 3 yes and 2 no would average to (1+1+1+2+2) / 5 = 1.4. But does that mean?
Wouldn't you want to calculate the percentage number of Yes and No of the total number of indications? I've added some DAX measures that calculate such percentages. See attached. If this is not what you want, please explain what 'average' (in numbers) you expect to see in the pivot table.
Hi, excuse my butting in 🙂
I'm not that proficient in Pivot Tables or DAX functions, but I like to play with formula's next to VBA.
This is my formula idea,
Hans, hi, thank you for taking time to review the issue and provide a solution. This will work .