Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm attempting to show only records where the following criteria are met but finding it's not quite doing what I want:
if the change flag is AN and the mod number begins with T and the part category is B or M and the Mod_number starts with 1 and the component contains / or - then return the component:
=if([BCD CHANGE_FLAG]='AN' AND Mod_no like 'T*' and [BCD Partcategory]='B' or [BCD Partcategory]='M'and Left(Mod_no, 1) = 'T' and (substringcount([BCD COMPONENT], '/')>0 or substringcount([BCD COMPONENT], '-')>0) ,[BCD COMPONENT])
What I'm getting is components without a / or - and mod numbers that don't begin with T along with the ones I'm expecting:
Is it lack of brackets? placement?
Thanks in advance!
Your first OR isn't wrapped with brackets like the second one. Beside setting the brackets you may adjust the logic to be able to use only AND connections between the conditions, for example:
if([BCD CHANGE_FLAG]='AN' AND
Mod_no like 'T*' and
match([BCD Partcategory], 'B', 'M') and
Left(Mod_no, 1) = 'T' and
rangesum(substringcount([BCD COMPONENT], '/'), substringcount([BCD COMPONENT], '-')) ,
[BCD COMPONENT])
Your first OR isn't wrapped with brackets like the second one. Beside setting the brackets you may adjust the logic to be able to use only AND connections between the conditions, for example:
if([BCD CHANGE_FLAG]='AN' AND
Mod_no like 'T*' and
match([BCD Partcategory], 'B', 'M') and
Left(Mod_no, 1) = 'T' and
rangesum(substringcount([BCD COMPONENT], '/'), substringcount([BCD COMPONENT], '-')) ,
[BCD COMPONENT])