This content has been marked as final. Show 2 replies
I created a sample qvw (attached) in which I am trying to get the prescriber with maximum TRx. I am using FirstSortedValue function for satisfying the requirement.
However, I want this text to be independent of the prescriber selection. For instance, if P1, P2, P3 and P4 exist in the data and P4 is the prescriber with max TRx, how can I keep P4 as the top prescriber even when P1 and P2 are selected ?
The top prescriber is obtained with expression
=FirstSortedValue(Prescriber, -Aggr(Sum(TRx), Prescriber))