Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
wandapec
Partner - Contributor III
Partner - Contributor III

Set Analysis with reference to previous column

Hoping someone can help with this? The equation below works - it counts the number of pharmacists in each pharmacy where the %compliance is above 0.65. However, the value 0.65 needs to refer to a previous column for each pharmacy i.e. there is value for each pharmacy that is calculated in a previous column.

=count(distinct {$<PharmacistCCP = {"=(count(distinct{$<FormularyDescription = {'Formulary 1','Formulary 2','Formulary 3'}>}ScriptNoNappiCode)/count(distinct{$<FormularyDescription = {'Formulary 1','Formulary 2','Formulary 3','Non Formulary'}>}ScriptNoNappiCode))*0.9 > 0.65"}>}PharmacistCCP)


I just can't get it to work....this is what I have ended up with - I have hi-lighted the changes in bold.

=count(distinct {$<PharmacistCCP = {"=(count(distinct{$<FormularyDescription = {'Formulary 1','Formulary 2','Formulary 3'}>}ScriptNoNappiCode)/count(distinct{$<FormularyDescription = {'Formulary 1','Formulary 2','Formulary 3','Non Formulary'}>}ScriptNoNappiCode))*0.9 > $(column(4))"}>}PharmacistCCP)


1 Reply
Not applicable

Hello all,

I have the same problem ... anyone has a solution?

I have a straight table with columns A, B, C, D .. A and B being dimensions, C and D being expressions.

D shall be calculated based on the value appearing in the same row in column A.
I know that I can use the syntax [ A ] to refer to that column in the D-expression (e.g. D= [ A ] & ' extended').

But so far I fail to make it work in a set expression: D = sum({<MyField={ [ A ] & ' extended' }>} MyValue)
or better with $-expansion: D= sum({<MyField={$(=[ A ] & ' extended')}>} MyValue).

What do I miss?
Thanks for any reply,

Thilo