daniel3141
New Member
- Joined
- Nov 27, 2017
- Messages
- 2
Inmay data I have two columns: organisation Code and flag, I want to create a newvariable based on these two. The flag column contains either 0 or 1.
Thesame organisation code can appear many times in the organisation code column, but if there areone or more examples of an organisation code having the number 1 in the flagcolumn, I want the new variable to be 1 in all cases for this organisation even ifthe same organisation is followed by 0 in the flag column in some cases.
OPX 0
OPX 0
OPX 1
OPX 0
So in the above example, the new variable will be a 1 for all cases of organisation code OPX, because there is at least one example of this organisation being followed by 1 in the flag column.
Doesanyone know how to do this within a formula?<o
></o
>
Thesame organisation code can appear many times in the organisation code column, but if there areone or more examples of an organisation code having the number 1 in the flagcolumn, I want the new variable to be 1 in all cases for this organisation even ifthe same organisation is followed by 0 in the flag column in some cases.
OPX 0
OPX 0
OPX 1
OPX 0
So in the above example, the new variable will be a 1 for all cases of organisation code OPX, because there is at least one example of this organisation being followed by 1 in the flag column.
Doesanyone know how to do this within a formula?<o

