The issue here is that the set analysis is only evaluated once per chart, not per dimension line.
And you need to select a doctor, thus the taxonomy codes will correctly be set using the p() function, right?
At the moment, I don't see an easy answer here, and you may have to consider changing your data model to support your analysis.
Thank you swuehl.
The timing of the set analysis evaluation makes sense given the behavior I'm seeing.
Unfortunatley, changing the data model is really not possible since we have a rather large production application already using it. This functionality is viewed as very useful for our users, but probably not at the expense of modifying the data model.
Based on swuehl's comment about the set analysis expression only being evaluated once per chart, I searched around and found the article on Evaluating Sets in the Context of a Dimension ( http://community.qlik.com/docs/DOC-1335).
I know this technique works for a small number of Physician Names, and I'm working on getting it generalized in my load script for a large set of names to see if it performs well.